movieplayer/record: move timeshift deletion code to moviebrowser ...

... to get sure it's not deleted until playback is stopped


Origin commit data
------------------
Commit: 4df740d539
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-08-01 (Wed, 01 Aug 2018)

Origin message was:
------------------
- movieplayer/record: move timeshift deletion code to moviebrowser ...

... to get sure it's not deleted until playback is stopped
This commit is contained in:
vanhofen
2018-08-01 19:27:44 +02:00
parent 29bd2f9787
commit 772247afed
3 changed files with 23 additions and 9 deletions

View File

@@ -322,20 +322,16 @@ bool CRecordInstance::Stop(bool remove_event)
if(!autoshift)
CFEManager::getInstance()->unlockFrontend(frontend, true);//FIXME testing
CCamManager::getInstance()->Stop(channel_id, CCamManager::RECORD);
CCamManager::getInstance()->Stop(channel_id, CCamManager::RECORD);
if (autoshift && g_settings.auto_delete)
CMoviePlayerGui::getInstance().deleteTimeshift();
if((autoshift && g_settings.auto_delete) /* || autoshift_delete*/) {
snprintf(buf,sizeof(buf), "nice -n 20 rm -f \"%s.ts\"", filename); //NI
my_system(3, "/bin/sh", "-c", buf);
snprintf(buf,sizeof(buf), "%s.xml", filename);
//autoshift_delete = false;
unlink(buf);
}
if(recording_id && remove_event) {
g_Timerd->stopTimerEvent(recording_id);
recording_id = 0;
}
//CVFD::getInstance()->ShowIcon(VFD_ICON_CAM1, false);
//CVFD::getInstance()->ShowIcon(VFD_ICON_CAM1, false);
WaitRecMsg(end_time, 2);
hintBox.hide();
return true;