diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 28076ef7d..df8700e51 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -159,6 +159,8 @@ install_DATA += \ mp_f-skip.png \ mp_pause.png \ mp_play.png \ + mp_play_repeat_all.png \ + mp_play_repeat_track.png \ mp3.jpg \ mp3.png \ mp3-0.jpg \ diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 96fd7493d..6a47c0da9 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -745,6 +745,16 @@ bool CFileBrowser::readDir_std(const std::string & dirname, CFileList* flist) return true; } +bool CFileBrowser::checkBD(CFile &file) +{ + if (Hide_records && S_ISDIR(file.Mode)) { + std::string bdmv = file.Name + "/BDMV/index.bdmv"; + if (access(bdmv.c_str(), F_OK) == 0) + return true; + } + return false; +} + //------------------------------------------------------------------------ bool CFileBrowser::exec(const char * const dirname) @@ -806,7 +816,7 @@ bool CFileBrowser::exec(const char * const dirname) msg_repeatok = CRCInput::RC_down; // jump to next item } } - else if (msg_repeatok == CRCInput::RC_up) + if (msg_repeatok == CRCInput::RC_up) { if (!(filelist.empty())) { @@ -998,12 +1008,7 @@ bool CFileBrowser::exec(const char * const dirname) std::string filename = filelist[selected].Name; if ( filename.length() > 1 ) { - bool return_dir = false; - if (Hide_records && S_ISDIR(filelist[selected].Mode)) { - std::string bdmv = filename + "/BDMV/index.bdmv"; - if (access(bdmv.c_str(), F_OK) == 0) - return_dir = true; - } + bool return_dir = checkBD(filelist[selected]); if(!return_dir && (!Multi_Select) && S_ISDIR(filelist[selected].Mode) && !Dir_Mode) { #ifdef ENABLE_INTERNETRADIO @@ -1081,7 +1086,8 @@ bool CFileBrowser::exec(const char * const dirname) for(unsigned int i = 0; i < filelist.size();i++) if(filelist[i].Marked) { - if(S_ISDIR(filelist[i].Mode)) { + bool return_dir = checkBD(filelist[i]); + if(!return_dir && S_ISDIR(filelist[i].Mode)) { if (!progress) { progress = new CProgressWindow(); progress->setTitle(LOCALE_FILEBROWSER_SCAN); diff --git a/src/gui/filebrowser.h b/src/gui/filebrowser.h index 0a95c1556..33692e30d 100644 --- a/src/gui/filebrowser.h +++ b/src/gui/filebrowser.h @@ -191,6 +191,7 @@ class CFileBrowser void paintFoot(); void paintSMSKey(); void recursiveDelete(const char* file); + bool checkBD(CFile &file); protected: void commonInit(); diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index ef8fc4198..85db0edc1 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -475,7 +475,8 @@ void CInfoViewer::show_current_next(bool new_chan, int epgpos) void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channel_Id, const std::string &Channel, const std::string &g_file_epg, const std::string &g_file_epg1, - const int duration, const int curr_pos) + const int duration, const int curr_pos, + const int repeat_mode) { if (g_settings.volume_pos == CVolumeBar::VOLUMEBAR_POS_BOTTOM_LEFT || g_settings.volume_pos == CVolumeBar::VOLUMEBAR_POS_BOTTOM_RIGHT || @@ -541,7 +542,16 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe const char *playicon = NULL; switch (playState) { case CMoviePlayerGui::PLAY: - playicon = NEUTRINO_ICON_PLAY; + switch (repeat_mode) { + case CMoviePlayerGui::REPEAT_ALL: + playicon = NEUTRINO_ICON_PLAY_REPEAT_ALL; + break; + case CMoviePlayerGui::REPEAT_TRACK: + playicon = NEUTRINO_ICON_PLAY_REPEAT_TRACK; + break; + default: + playicon = NEUTRINO_ICON_PLAY; + } speed = 0; break; case CMoviePlayerGui::PAUSE: diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index ee541c62d..2438cbe63 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -160,7 +160,7 @@ class CInfoViewer void showMovieTitle(const int playState, const t_channel_id &channel_id, const std::string &title, const std::string &g_file_epg, const std::string &g_file_epg1, - const int duration, const int curr_pos); + const int duration, const int curr_pos, const int repeat_mode); void start(); void showEpgInfo(); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index dc948a42f..19234f69e 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -59,13 +59,6 @@ #include #include -//extern CPlugins *g_PluginList; -#if HAVE_TRIPLEDRAGON -#define LCD_MODE CVFD::MODE_MOVIE -#else -#define LCD_MODE CVFD::MODE_MENU_UTF8 -#endif - extern cVideo * videoDecoder; extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */ extern CInfoClock *InfoClock; @@ -101,6 +94,7 @@ CMoviePlayerGui::~CMoviePlayerGui() delete filebrowser; delete bookmarkmanager; delete playback; + filelist.clear(); instance_mp = NULL; } @@ -145,6 +139,8 @@ void CMoviePlayerGui::Init(void) filebrowser->Filter = &tsfilefilter; filebrowser->Hide_records = true; + filebrowser->Multi_Select = true; + filebrowser->Dirs_Selectable = true; speed = 1; timeshift = 0; @@ -160,6 +156,7 @@ void CMoviePlayerGui::Init(void) bgThread = 0; info_1 = ""; info_2 = ""; + filelist_it = filelist.end(); } void CMoviePlayerGui::cutNeutrino() @@ -236,6 +233,10 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) isHTTP = false; isUPNP = false; isWebTV = false; + isYT = false; + + filelist_it = filelist.end(); + filelist.clear(); if (actionKey == "tsmoviebrowser") { isMovieBrowser = true; @@ -246,6 +247,7 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) InfoClock->enableInfoClock(false); isMovieBrowser = true; moviebrowser->setMode(MB_SHOW_YT); + isYT = true; } else if (actionKey == "fileplayback") { } @@ -278,9 +280,14 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) } while(!isHTTP && !isUPNP && SelectFile()) { - PlayFile(); - if(timeshift) + if(timeshift != TSHIFT_MODE_OFF) { + PlayFile(); break; + } + do { + PlayFile(); + } + while (repeat_mode || filelist_it != filelist.end()); } bookmarkmanager->flush(); @@ -291,7 +298,7 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); - if (moviebrowser->getMode() == MB_SHOW_YT) { + if (isYT) { CAudioMute::getInstance()->enableMuteIcon(true); InfoClock->enableInfoClock(true); } @@ -300,7 +307,7 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) timeshift = 0; return menu_return::RETURN_EXIT_ALL; } - return menu_ret; //menu_return::RETURN_REPAINT; + return menu_ret; } void CMoviePlayerGui::updateLcd() @@ -340,7 +347,7 @@ void CMoviePlayerGui::updateLcd() break; } lcd += name; - CVFD::getInstance()->setMode(LCD_MODE); + CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8); CVFD::getInstance()->showMenuText(0, lcd.c_str(), -1, true); } @@ -408,14 +415,32 @@ void CMoviePlayerGui::makeFilename() } } +bool CMoviePlayerGui::prepareFile(CFile *file) +{ + bool ret = true; + + numpida = 0; currentapid = 0; + currentspid = -1; + numsubs = 0; + file_name = file->Name; + if(file->getType() == CFile::FILE_PLAYLIST) + parsePlaylist(file); + else if(file->getType() == CFile::FILE_ISO) + ret = mountIso(file); + + if (ret) + makeFilename(); + return ret; +} + bool CMoviePlayerGui::SelectFile() { bool ret = false; menu_ret = menu_return::RETURN_REPAINT; Cleanup(); - pretty_name = ""; - file_name = ""; + pretty_name.clear(); + file_name.clear(); printf("CMoviePlayerGui::SelectFile: isBookmark %d timeshift %d isMovieBrowser %d\n", isBookmark, timeshift, isMovieBrowser); wakeup_hdd(g_settings.network_nfs_recordingdir.c_str()); @@ -451,7 +476,7 @@ bool CMoviePlayerGui::SelectFile() if (moviebrowser->getMode() == MB_SHOW_RECORDS) { file_name = file->Name; } - else if (moviebrowser->getMode() == MB_SHOW_YT) { + else if (isYT) { file_name = file->Url; is_file_player = true; } @@ -465,21 +490,21 @@ bool CMoviePlayerGui::SelectFile() } } else menu_ret = moviebrowser->getMenuRet(); - } - else { // filebrowser + } else { // filebrowser CAudioMute::getInstance()->enableMuteIcon(false); InfoClock->enableInfoClock(false); if (filebrowser->exec(Path_local.c_str()) == true) { Path_local = filebrowser->getCurrentDir(); - CFile *file; - if ((file = filebrowser->getSelectedFile()) != NULL) { + CFile *file = filebrowser->getSelectedFile(); + filelist = filebrowser->getSelectedFiles(); + filelist_it = filelist.end(); + if (filelist.size() > 0) { + filelist_it = filelist.begin(); + file = &(*filelist_it); + } + if (file) { is_file_player = true; - file_name = file->Name.c_str(); - ret = true; - if(file->getType() == CFile::FILE_PLAYLIST) - parsePlaylist(file); - else if(file->getType() == CFile::FILE_ISO) - ret = mountIso(file); + ret = prepareFile(file); } } else menu_ret = filebrowser->getMenuRet(); @@ -535,10 +560,6 @@ void* CMoviePlayerGui::bgPlayThread(void *arg) set_threadname(__func__); CMoviePlayerGui *mp = (CMoviePlayerGui *) arg; -#if 0 - while (mp->playback->IsPlaying()) - usleep(100000); -#endif bgmutex.lock(); cond.wait(&bgmutex); bgmutex.unlock(); @@ -570,9 +591,9 @@ bool CMoviePlayerGui::PlayBackgroundStart(const std::string &file, const std::st Cleanup(); #if 0 - isYT = false; isNK = false; #endif + isYT = false; isWebTV = true; is_file_player = 1; isMovieBrowser = false; @@ -602,8 +623,9 @@ bool CMoviePlayerGui::PlayBackgroundStart(const std::string &file, const std::st void CMoviePlayerGui::stopPlayBack(void) { printf("%s: stopping...\n", __func__); - playback->RequestAbort(); + //playback->RequestAbort(); + repeat_mode = REPEAT_OFF; if (bgThread) { printf("%s: this %x join background thread %x\n", __func__, (int) this, (int) CMoviePlayerGui::bgPlayThread);fflush(stdout); cond.broadcast(); @@ -632,7 +654,7 @@ void CMoviePlayerGui::PlayFile(void) PlayFileStart(); mutex.unlock(); PlayFileLoop(); - PlayFileEnd(); + PlayFileEnd(repeat_mode == REPEAT_OFF); } bool CMoviePlayerGui::PlayFileStart(void) @@ -641,7 +663,6 @@ bool CMoviePlayerGui::PlayFileStart(void) time_forced = false; - //CTimeOSD FileTime; position = 0, duration = 0; speed = 1; @@ -687,7 +708,10 @@ bool CMoviePlayerGui::PlayFileStart(void) if(!res) { playback->Close(); + repeat_mode = REPEAT_OFF; + return false; } else { + repeat_mode = (repeat_mode_enum) g_settings.movieplayer_repeat_on; playstate = CMoviePlayerGui::PLAY; CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, true); if(timeshift) { @@ -753,6 +777,7 @@ void CMoviePlayerGui::PlayFileLoop(void) bool first_start = true; bool update_lcd = true; int eof = 0; + bool at_eof = !(playstate >= CMoviePlayerGui::PLAY);; while (playstate >= CMoviePlayerGui::PLAY) { if (update_lcd) { @@ -760,7 +785,7 @@ void CMoviePlayerGui::PlayFileLoop(void) updateLcd(); } if (first_start) { - callInfoViewer(/*duration, position*/); + callInfoViewer(); first_start = false; } @@ -773,11 +798,8 @@ void CMoviePlayerGui::PlayFileLoop(void) FileTime.update(position, duration); if(duration > 100) file_prozent = (unsigned char) (position / (duration / 100)); -#if HAVE_TRIPLEDRAGON - CVFD::getInstance()->showPercentOver(file_prozent, true, CVFD::MODE_MOVIE); -#else + CVFD::getInstance()->showPercentOver(file_prozent); -#endif playback->GetSpeed(speed); /* at BOF lib set speed 1, check it */ @@ -790,11 +812,13 @@ void CMoviePlayerGui::PlayFileLoop(void) #endif /* in case ffmpeg report incorrect values */ int posdiff = duration - position; - if ((posdiff > 0) && (posdiff < 1000) && !timeshift) + if ((posdiff > 0) && (posdiff < 2000) && !timeshift) { - /* 10 seconds after end-of-file, stop */ - if (++eof > 10) - g_RCInput->postMsg((neutrino_msg_t) g_settings.mpkey_stop, 0); + int delay = (filelist_it != filelist.end()) ? 5 : 10; + if (++eof > delay) { + at_eof = true; + break; + } } else eof = 0; @@ -812,8 +836,32 @@ void CMoviePlayerGui::PlayFileLoop(void) stop_it = (ShowMsg(LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT, LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT_STOP, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes); if (stop_it) playstate = CMoviePlayerGui::STOPPED; - if ((duration - position) > 600000) - makeScreenShot(true); + + repeat_mode = REPEAT_OFF; + filelist.clear(); + filelist_it = filelist.end(); + } else if ((filelist.size() > 0 && msg == (neutrino_msg_t) CRCInput::RC_right)) { + if (filelist_it < (filelist.end() - 1)) { + ++filelist_it; + playstate = CMoviePlayerGui::STOPPED; + } else if (repeat_mode == REPEAT_ALL) { + ++filelist_it; + if (filelist_it == filelist.end()) + filelist_it = filelist.begin(); + playstate = CMoviePlayerGui::STOPPED; + } + } else if(filelist.size() > 1 && msg == (neutrino_msg_t) CRCInput::RC_left) { + if (filelist_it != filelist.begin()) { + playstate = CMoviePlayerGui::STOPPED; + --filelist_it; + } + } else if(!timeshift && !isWebTV && !isYT && (msg == (neutrino_msg_t) g_settings.mpkey_next_repeat_mode)) { + repeat_mode = (repeat_mode_enum)((int)repeat_mode + 1); + if (repeat_mode > (int) REPEAT_ALL) + repeat_mode = REPEAT_OFF; + g_settings.movieplayer_repeat_on = repeat_mode; + callInfoViewer(); + } else if (msg == (neutrino_msg_t) g_settings.mpkey_play) { if (time_forced) { time_forced = false; @@ -823,10 +871,9 @@ void CMoviePlayerGui::PlayFileLoop(void) playstate = CMoviePlayerGui::PLAY; speed = 1; playback->SetSpeed(speed); - //update_lcd = true; updateLcd(); if (!timeshift) - callInfoViewer(/*duration, position*/); + callInfoViewer(); } } else if (msg == (neutrino_msg_t) g_settings.mpkey_pause) { if (playstate == CMoviePlayerGui::PAUSE) { @@ -840,10 +887,9 @@ void CMoviePlayerGui::PlayFileLoop(void) speed = 0; playback->SetSpeed(speed); } - //update_lcd = true; updateLcd(); if (!timeshift) - callInfoViewer(/*duration, position*/); + callInfoViewer(); } else if (msg == (neutrino_msg_t) g_settings.mpkey_bookmark) { if (is_file_player) @@ -879,14 +925,13 @@ void CMoviePlayerGui::PlayFileLoop(void) playstate = msg == (neutrino_msg_t) g_settings.mpkey_rewind ? CMoviePlayerGui::REW : CMoviePlayerGui::FF; updateLcd(); } - //update_lcd = true; if (!FileTime.IsVisible() && !time_forced) { FileTime.switchMode(position, duration); time_forced = true; } if (!timeshift) - callInfoViewer(/*duration, position*/); + callInfoViewer(); } else if (msg == CRCInput::RC_1) { // Jump Backwards 1 minute SetPosition(-60 * 1000); } else if (msg == CRCInput::RC_3) { // Jump Forward 1 minute @@ -927,10 +972,9 @@ void CMoviePlayerGui::PlayFileLoop(void) SetPosition(1000 * (hh * 3600 + mm * 60 + ss), true); } else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) { - callInfoViewer(/*duration, position*/); + callInfoViewer(); update_lcd = true; clearSubtitle(); - //showHelpTS(); } else if(timeshift && (msg == CRCInput::RC_text || msg == CRCInput::RC_epg || msg == NeutrinoMessages::SHOW_EPG)) { bool restore = FileTime.IsVisible(); FileTime.kill(); @@ -965,6 +1009,9 @@ void CMoviePlayerGui::PlayFileLoop(void) menu_ret = menu_return::RETURN_EXIT_ALL; playstate = CMoviePlayerGui::STOPPED; + repeat_mode = REPEAT_OFF; + filelist.clear(); + filelist_it = filelist.end(); g_RCInput->postMsg(msg, data); } else if (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER) { if (playstate == CMoviePlayerGui::PLAY && (position >= 300000 || (duration<300000 && (position>(duration /2))))) @@ -976,27 +1023,38 @@ void CMoviePlayerGui::PlayFileLoop(void) } else { if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all) { printf("CMoviePlayerGui::PlayFile: neutrino handleMsg messages_return::cancel_all\n"); - playstate = CMoviePlayerGui::STOPPED; menu_ret = menu_return::RETURN_EXIT_ALL; + playstate = CMoviePlayerGui::STOPPED; + repeat_mode = REPEAT_OFF; + filelist.clear(); + filelist_it = filelist.end(); } else if ( msg <= CRCInput::RC_MaxRC ) { update_lcd = true; clearSubtitle(); } } + } + printf("CMoviePlayerGui::PlayFile: exit, isMovieBrowser %d p_movie_info %x\n", isMovieBrowser, (int) p_movie_info); + playstate = CMoviePlayerGui::STOPPED; + handleMovieBrowser((neutrino_msg_t) g_settings.mpkey_stop, position); + if ((duration - position) > 600000) + makeScreenShot(true); - if (playstate == CMoviePlayerGui::STOPPED) { - printf("CMoviePlayerGui::PlayFile: exit, isMovieBrowser %d p_movie_info %x\n", isMovieBrowser, (int) p_movie_info); - playstate = CMoviePlayerGui::STOPPED; - handleMovieBrowser((neutrino_msg_t) g_settings.mpkey_stop, position); - } + if (at_eof && filelist.size() > 0) { + if (filelist_it != filelist.end() && repeat_mode != REPEAT_TRACK) + ++filelist_it; + + if (filelist_it == filelist.end() && repeat_mode == REPEAT_ALL) + filelist_it = filelist.begin(); } } void CMoviePlayerGui::PlayFileEnd(bool restore) { printf("%s: stopping, this %x thread %x\n", __func__, (int) this, (int) CMoviePlayerGui::bgPlayThread);fflush(stdout); - FileTime.kill(); + if (filelist_it == filelist.end()) + FileTime.kill(); clearSubtitle(); playback->SetSpeed(1); @@ -1017,9 +1075,13 @@ void CMoviePlayerGui::PlayFileEnd(bool restore) InfoClock->enableInfoClock(false); stopped = true; printf("%s: stopped\n", __func__); + if (filelist.size() > 0 && filelist_it != filelist.end()) { + pretty_name.clear(); + prepareFile(&(*filelist_it)); + } } -void CMoviePlayerGui::callInfoViewer(/*const int duration, const int curr_pos*/) +void CMoviePlayerGui::callInfoViewer() { if(timeshift) { g_InfoViewer->showTitle(CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber(), @@ -1031,12 +1093,12 @@ void CMoviePlayerGui::callInfoViewer(/*const int duration, const int curr_pos*/) if (isMovieBrowser && p_movie_info) { g_InfoViewer->showMovieTitle(playstate, p_movie_info->epgEpgId >>16, p_movie_info->epgChannel, p_movie_info->epgTitle, p_movie_info->epgInfo1, - duration, position); + duration, position, repeat_mode); return; } /* not moviebrowser => use the filename as title */ - g_InfoViewer->showMovieTitle(playstate, 0, pretty_name, info_1, info_2, duration, position); + g_InfoViewer->showMovieTitle(playstate, 0, pretty_name, info_1, info_2, duration, position, repeat_mode); } bool CMoviePlayerGui::getAudioName(int apid, std::string &apidtitle) diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 4fd8be092..e0d0a848a 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -67,6 +67,8 @@ class CMoviePlayerGui : public CMenuTarget REW = 6 }; + enum repeat_mode_enum { REPEAT_OFF = 0, REPEAT_TRACK = 1, REPEAT_ALL = 2 }; + private: CFrameBuffer * frameBuffer; int m_LastMode; @@ -91,6 +93,7 @@ class CMoviePlayerGui : public CMenuTarget unsigned short apids[MAX_PLAYBACK_PIDS]; unsigned short ac3flags[MAX_PLAYBACK_PIDS]; unsigned short currentapid, currentac3; + repeat_mode_enum repeat_mode; /* subtitles vars */ unsigned short numsubs; @@ -107,6 +110,7 @@ class CMoviePlayerGui : public CMenuTarget bool isHTTP; bool isUPNP; bool isWebTV; + bool isYT; bool showStartingHint; CMovieBrowser* moviebrowser; MI_MOVIE_INFO * p_movie_info; @@ -119,6 +123,8 @@ class CMoviePlayerGui : public CMenuTarget bool stopped; CFileBrowser * filebrowser; CFileFilter tsfilefilter; + CFileList filelist; + CFileList::iterator filelist_it; std::string Path_local; int menu_ret; bool autoshot_done; @@ -144,7 +150,7 @@ class CMoviePlayerGui : public CMenuTarget void restoreNeutrino(); void showHelpTS(void); - void callInfoViewer(/*const int duration, const int pos*/); + void callInfoViewer(); void fillPids(); bool getAudioName(int pid, std::string &apidtitle); void getCurrentAudioName( bool file_player, std::string &audioname); @@ -163,6 +169,7 @@ class CMoviePlayerGui : public CMenuTarget void parsePlaylist(CFile *file); bool mountIso(CFile *file); void makeFilename(); + bool prepareFile(CFile *file); void makeScreenShot(bool autoshot = false, bool forcover = false); void Cleanup(); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 7bfc413a2..a70ad3626 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -749,6 +749,9 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.audioplayer_enable_sc_metadata = configfile.getInt32("audioplayer_enable_sc_metadata",1); g_settings.shoutcast_dev_id = configfile.getString("shoutcast_dev_id","XXXXXXXXXXXXXXXX"); + //Movie-Player + g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF); + //Filebrowser g_settings.filebrowser_showrights = configfile.getInt32("filebrowser_showrights", 1); g_settings.filebrowser_sortmethod = configfile.getInt32("filebrowser_sortmethod", 0); @@ -1188,6 +1191,9 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "audioplayer_enable_sc_metadata", g_settings.audioplayer_enable_sc_metadata ); configfile.setString( "shoutcast_dev_id", g_settings.shoutcast_dev_id ); + //Movie-Player + configfile.setInt32( "movieplayer_repeat_on", g_settings.movieplayer_repeat_on ); + //Filebrowser configfile.setInt32("filebrowser_showrights", g_settings.filebrowser_showrights); configfile.setInt32("filebrowser_sortmethod", g_settings.filebrowser_sortmethod); diff --git a/src/system/settings.h b/src/system/settings.h index e168ac7af..72ba9e385 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -654,6 +654,9 @@ struct SNeutrinoSettings int filebrowser_sortmethod; int filebrowser_denydirectoryleave; + //movieplayer + int movieplayer_repeat_on; + //zapit setup std::string StartChannelTV; std::string StartChannelRadio;