Skip to content

Commit

Permalink
new option added for eof retries on lost server connections
Browse files Browse the repository at this point in the history
  • Loading branch information
BPanther committed Jul 26, 2023
1 parent 3998869 commit ccfa7fa
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 12 deletions.
1 change: 1 addition & 0 deletions data/locale/deutsch.locale
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,7 @@ movieplayer.bookmarkname_hint1 Neues Lesezeichen
movieplayer.bookmarkname_hint2 Geben Sie den Namen für das neue Lesezeichen ein
movieplayer.chapters Kapitel
movieplayer.display_playtime Zeige Spielzeit im VFD/LCD
movieplayer.eof_cnt EOF Wiederholungen nach Serverabbruch (WebTV)
movieplayer.fileplayback_audio Multiformat-Audiowiedergabe
movieplayer.fileplayback_video Multiformat-Videowiedergabe
movieplayer.head Movieplayer
Expand Down
1 change: 1 addition & 0 deletions data/locale/english.locale
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,7 @@ movieplayer.bookmarkname_hint1 New bookmark
movieplayer.bookmarkname_hint2 Enter a name for your new bookmark
movieplayer.chapters Chapters
movieplayer.display_playtime Show playtime in VFD
movieplayer.eof_cnt EOF Retries after lost server connection (WebTV)
movieplayer.fileplayback_audio Multiformat audio playback
movieplayer.fileplayback_video Multiformat video playback
movieplayer.head Movieplayer
Expand Down
4 changes: 4 additions & 0 deletions src/gui/mediaplayer_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ int CMediaPlayerSetup::showMediaPlayerSetup()
mc->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_DISPLAY_PLAYTIME);
mediaSetup->addItem(mc);

CMenuOptionNumberChooser * ef = new CMenuOptionNumberChooser(LOCALE_MOVIEPLAYER_EOF_CNT, &g_settings.eof_cnt, true, 1, 10, NULL);
// ef->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_EOF_CNT);
mediaSetup->addItem(ef);

int res = mediaSetup->exec (NULL, "");
selected = mediaSetup->getSelected();
delete mediaSetup;
Expand Down
8 changes: 4 additions & 4 deletions src/gui/movieplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,15 +897,15 @@ void* CMoviePlayerGui::bgPlayThread(void *arg)
mutex.unlock();

int eof = 0, pos = 0;
int eof_max = mp->isWebChannel ? 1 : 5;
#if defined (BOXMODEL_VUPLUS_ARM)
eof_max = 0;
#endif
int eof_max = mp->isWebChannel ? g_settings.eof_cnt : 5;

while(webtv_started) {
if (mp->playback->GetPosition(mp->position, mp->duration, mp->isWebChannel)) {
if (pos == mp->position)
{
eof++;
printf("CMoviePlayerGui::bgPlayThread: eof counter: %d\n", eof);
}
else
eof = 0;

Expand Down
2 changes: 2 additions & 0 deletions src/neutrino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ if (g_info.hw_caps->can_shutdown)
#else
g_settings.movieplayer_display_playtime = configfile.getInt32("movieplayer_display_playtime", 0);
#endif
g_settings.eof_cnt = configfile.getInt32("movieplayer_eof_cnt", 1);

#ifdef TMDB_API_KEY
g_settings.tmdb_api_key = TMDB_API_KEY;
Expand Down Expand Up @@ -1697,6 +1698,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
//Movie-Player
configfile.setInt32( "movieplayer_repeat_on", g_settings.movieplayer_repeat_on );
configfile.setInt32( "movieplayer_display_playtime", g_settings.movieplayer_display_playtime );
configfile.setInt32( "movieplayer_eof_cnt", g_settings.eof_cnt );
#ifndef TMDB_API_KEY
configfile.setString( "tmdb_api_key", g_settings.tmdb_api_key );
#endif
Expand Down
1 change: 1 addition & 0 deletions src/system/locals.h
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,7 @@ typedef enum
LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT2,
LOCALE_MOVIEPLAYER_CHAPTERS,
LOCALE_MOVIEPLAYER_DISPLAY_PLAYTIME,
LOCALE_MOVIEPLAYER_EOF_CNT,
LOCALE_MOVIEPLAYER_FILEPLAYBACK_AUDIO,
LOCALE_MOVIEPLAYER_FILEPLAYBACK_VIDEO,
LOCALE_MOVIEPLAYER_HEAD,
Expand Down
1 change: 1 addition & 0 deletions src/system/locals_intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,7 @@ const char *locale_real_names[] =
"movieplayer.bookmarkname_hint2",
"movieplayer.chapters",
"movieplayer.display_playtime",
"movieplayer.eof_cnt",
"movieplayer.fileplayback_audio",
"movieplayer.fileplayback_video",
"movieplayer.head",
Expand Down
17 changes: 9 additions & 8 deletions src/system/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -867,13 +867,13 @@ struct SNeutrinoSettings
int picviewer_scaling;

//audioplayer
int audioplayer_display;
int audioplayer_follow;
int audioplayer_highprio;
int audioplayer_select_title_by_name;
int audioplayer_repeat_on;
int audioplayer_show_playlist;
int audioplayer_enable_sc_metadata;
int audioplayer_display;
int audioplayer_follow;
int audioplayer_highprio;
int audioplayer_select_title_by_name;
int audioplayer_repeat_on;
int audioplayer_show_playlist;
int audioplayer_enable_sc_metadata;
std::string shoutcast_dev_id;
int shoutcast_enabled;

Expand All @@ -884,10 +884,11 @@ struct SNeutrinoSettings
int filebrowser_use_filter;

//movieplayer
int movieplayer_repeat_on;
int movieplayer_repeat_on;
int movieplayer_display_playtime;
std::string tmdb_api_key;
int tmdb_enabled;
int eof_cnt;

//zapit setup
std::string StartChannelTV;
Expand Down

0 comments on commit ccfa7fa

Please sign in to comment.