mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
record:restore user bookmarks
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1997 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -202,7 +202,16 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel /*, APIDList &
|
|||||||
|
|
||||||
bool CRecordInstance::Stop(bool remove_event)
|
bool CRecordInstance::Stop(bool remove_event)
|
||||||
{
|
{
|
||||||
char buf[FILENAMEBUFFERSIZE];
|
char buf[FILENAMEBUFFERSIZE]={0};
|
||||||
|
|
||||||
|
struct stat test;
|
||||||
|
snprintf(buf,sizeof(buf), "%s.xml", filename);
|
||||||
|
if(stat(buf, &test) == 0){
|
||||||
|
cMovieInfo->clearMovieInfo(recMovieInfo);
|
||||||
|
snprintf(buf,sizeof(buf), "%s.ts", filename);
|
||||||
|
recMovieInfo->file.Name = buf;
|
||||||
|
cMovieInfo->loadMovieInfo(recMovieInfo);//restore user bookmark
|
||||||
|
}
|
||||||
|
|
||||||
time_t end_time = time(0);
|
time_t end_time = time(0);
|
||||||
recMovieInfo->length = (int) round((double) (end_time - start_time) / (double) 60);
|
recMovieInfo->length = (int) round((double) (end_time - start_time) / (double) 60);
|
||||||
@@ -217,9 +226,9 @@ bool CRecordInstance::Stop(bool remove_event)
|
|||||||
CCamManager::getInstance()->Stop(channel_id, CCamManager::RECORD);
|
CCamManager::getInstance()->Stop(channel_id, CCamManager::RECORD);
|
||||||
|
|
||||||
if((autoshift && g_settings.auto_delete) /* || autoshift_delete*/) {
|
if((autoshift && g_settings.auto_delete) /* || autoshift_delete*/) {
|
||||||
sprintf(buf, "rm -f %s.ts &", filename);
|
snprintf(buf,sizeof(buf), "rm -f %s.ts &", filename);
|
||||||
system(buf);
|
system(buf);
|
||||||
sprintf(buf, "%s.xml", filename);
|
snprintf(buf,sizeof(buf), "%s.xml", filename);
|
||||||
//autoshift_delete = false;
|
//autoshift_delete = false;
|
||||||
unlink(buf);
|
unlink(buf);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user