diff options
Diffstat (limited to 'vdr-vdrmanager')
-rw-r--r-- | vdr-vdrmanager/helpers.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/vdr-vdrmanager/helpers.cpp b/vdr-vdrmanager/helpers.cpp index 3f4b9ec..b1ca86f 100644 --- a/vdr-vdrmanager/helpers.cpp +++ b/vdr-vdrmanager/helpers.cpp @@ -355,9 +355,7 @@ string cHelpers::SetTimerIntern(char op, string param) { default: return Error("unknown timer command"); } - return "START\r\nEND\r\n"; - } string cHelpers::SetTimerIntern(string args) { @@ -391,7 +389,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 +502,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 +821,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 |