diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 4d33e20a6..8f7375f37 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1997,9 +1997,7 @@ void CMoviePlayerGui::PlayFileLoop(void) callInfoViewer(); } else if (msg == (neutrino_msg_t) g_settings.mpkey_bookmark) { #if HAVE_COOL_HARDWARE || HAVE_ARM_HARDWARE - if (is_file_player) - selectChapter(); - else + if (is_file_player && selectChapter() == -1) #endif handleMovieBrowser((neutrino_msg_t) g_settings.mpkey_bookmark, position); update_lcd = true; @@ -2928,10 +2926,10 @@ void CMoviePlayerGui::showHelp() helpbox.hide(); } -void CMoviePlayerGui::selectChapter() +int CMoviePlayerGui::selectChapter() { if (!is_file_player) - return; + return 1; std::vector positions; std::vector titles; playback->GetChapters(positions, titles); @@ -2941,7 +2939,7 @@ void CMoviePlayerGui::selectChapter() playback->GetTitles(playlists, ptitles, current); if (positions.empty() && playlists.empty()) - return; + return -1; CMenuWidget ChSelector(LOCALE_MOVIEBROWSER_MENU_MAIN_BOOKMARKS, NEUTRINO_ICON_AUDIO); //ChSelector.addIntroItems(); @@ -2984,6 +2982,8 @@ void CMoviePlayerGui::selectChapter() currentapid = 0; playback->SetTitle(playlists[pselect]); } + + return 0; } std::string CMoviePlayerGui::getAPIDDesc(unsigned int i) diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index a13802a17..d791a5a24 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -232,7 +232,7 @@ class CMoviePlayerGui : public CMenuTarget void updateLcd(bool display_playtime = false); bool convertSubtitle(std::string &text); - void selectChapter(); + int selectChapter(); void selectAutoLang(); void parsePlaylist(CFile *file); bool mountIso(CFile *file);