From 4c6dd2d09e989441238d6e179e4cd9c0ed7d418d Mon Sep 17 00:00:00 2001 From: lado Date: Mon, 25 Feb 2013 13:45:08 +0100 Subject: timer delete bug fix --- vdr-vdrmanager/helpers.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'vdr-vdrmanager') diff --git a/vdr-vdrmanager/helpers.cpp b/vdr-vdrmanager/helpers.cpp index 72c59f9..91af240 100644 --- a/vdr-vdrmanager/helpers.cpp +++ b/vdr-vdrmanager/helpers.cpp @@ -142,8 +142,8 @@ string cHelpers::GetChannelsIntern(string wantedChannels) { result += channel->GetChannelID().ToString(); result += ":"; result += GetAudioTracks(channel); - result += ":"; - result += MapSpecialChars(cSource::ToString(channel->Source())); + result += ":"; + result += MapSpecialChars(cSource::ToString(channel->Source())); result += "\r\n"; } } @@ -390,18 +390,22 @@ string cHelpers::SetTimerIntern(char op, string param) { } /** - * this should come as a parameter later + * this should come lates as a command line parameter */ bool forceDelete = true; - if (t->Recording() && forceDelete == false) { - return Error("Timer is recording"); + if (t->Recording()) { + if(forceDelete == true){ + t->Skip(); + cRecordControls::Process(time(NULL)); + } else { + return Error("Timer is recording"); + } } - isyslog("deleting timer %s", *t->ToDescr()); + dsyslog("[vdrmanager] deleting timer %s", *t->ToDescr()); Timers.Del(t); Timers.SetModified(); - dsyslog("[vdrmanager] timer %s deleted", *t->ToDescr()); break; } case 'M': -- cgit v1.2.3