diff options
author | lado <herrlado@gmail.com> | 2012-02-02 16:30:26 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2012-02-02 16:30:26 +0100 |
commit | 53f41cf33fff92b38bc4a479c435e510628f2419 (patch) | |
tree | 71de3d2f4435b8bc1d6adce42436a269b1589714 /vdr-vdrmanager/helpers.cpp | |
parent | f04b065ab54eea26ec3af3dbcead56b044a410e1 (diff) | |
download | vdr-manager-53f41cf33fff92b38bc4a479c435e510628f2419.tar.gz vdr-manager-53f41cf33fff92b38bc4a479c435e510628f2419.tar.bz2 |
Tiemrs save
Diffstat (limited to 'vdr-vdrmanager/helpers.cpp')
-rw-r--r-- | vdr-vdrmanager/helpers.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 |