From 53f41cf33fff92b38bc4a479c435e510628f2419 Mon Sep 17 00:00:00 2001 From: lado Date: Thu, 2 Feb 2012 16:30:26 +0100 Subject: Tiemrs save --- vdr-vdrmanager/helpers.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'vdr-vdrmanager') diff --git a/vdr-vdrmanager/helpers.cpp b/vdr-vdrmanager/helpers.cpp index 3f4b9ec..2d4d136 100644 --- a/vdr-vdrmanager/helpers.cpp +++ b/vdr-vdrmanager/helpers.cpp @@ -356,6 +356,7 @@ string cHelpers::SetTimerIntern(char op, string param) { return Error("unknown timer command"); } + Timers.Save(); return "START\r\nEND\r\n"; } @@ -391,7 +392,7 @@ string cHelpers::SetTimerIntern(string args) { } string cHelpers::Error(const string& msg) { - return "!ERROR:" + msg + "\r\n"; + return "START\r\n!ERROR:" + msg + "\r\nEND\r\n"; } string cHelpers::SearchEventsIntern(string wantedChannels, string pattern) { @@ -504,7 +505,10 @@ string cHelpers::ToText(cRecording * recording) { result += MapSpecialChars(info->ChannelID().ToString()); result += ":"; - snprintf(buf, sizeof(buf)-1, "%d", RecordingLengthInSeconds(recording)); + + int length = RecordingLengthInSeconds(recording); + + snprintf(buf, sizeof(buf)-1, "%d", length); result += buf; result += "\r\n"; @@ -820,6 +824,10 @@ string cHelpers::UnMapSpecialChars(string text) { */ int cHelpers::RecordingLengthInSeconds(cRecording* recording) { +#if APIVERSNUM < 10721 + return -1; +#endif + int nf = recording->NumFrames(); if (nf >= 0) #if APIVERSNUM >= 10703 -- cgit v1.2.3