-add wakeup_hdd & file_exists to system-helpers

This commit is contained in:
satbaby
2012-09-11 20:35:47 +02:00
parent dfa3231469
commit c6ae7255ac
9 changed files with 42 additions and 28 deletions

View File

@@ -176,7 +176,7 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
startposition = 0;
puts("[movieplayer.cpp] executing " MOVIEPLAYER_START_SCRIPT ".");
if (my_system(MOVIEPLAYER_START_SCRIPT,NULL,NULL) != 0)
if (file_exists(MOVIEPLAYER_START_SCRIPT) && my_system(MOVIEPLAYER_START_SCRIPT,NULL,NULL) != 0)
perror(MOVIEPLAYER_START_SCRIPT " failed");
isMovieBrowser = false;
@@ -214,7 +214,7 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
bookmarkmanager->flush();
puts("[movieplayer.cpp] executing " MOVIEPLAYER_END_SCRIPT ".");
if (my_system(MOVIEPLAYER_END_SCRIPT,NULL,NULL) != 0)
if (file_exists(MOVIEPLAYER_END_SCRIPT) && my_system(MOVIEPLAYER_END_SCRIPT,NULL,NULL) != 0)
perror(MOVIEPLAYER_END_SCRIPT " failed");
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
@@ -301,7 +301,7 @@ bool CMoviePlayerGui::SelectFile()
printf("CMoviePlayerGui::SelectFile: isBookmark %d timeshift %d isMovieBrowser %d\n", isBookmark, timeshift, isMovieBrowser);
if (has_hdd)
system("(rm /hdd/.wakeup; touch /hdd/.wakeup; sync) > /dev/null 2> /dev/null &");
wakeup_hdd(g_settings.network_nfs_recordingdir);
if (timeshift) {
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();