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

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

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-08-01 19:27:44 +02:00
committed by Thilo Graf
parent 65a7f3a432
commit c4e8fd64aa
3 changed files with 23 additions and 9 deletions

View File

@@ -318,20 +318,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);
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;