The SVDRP command NEWT no longer checks whether a timer with the given data already exists

This commit is contained in:
Klaus Schmidinger 2013-01-17 15:21:07 +01:00
parent 904903f8d5
commit 6a8a790312
3 changed files with 13 additions and 13 deletions

View File

@ -3047,3 +3047,7 @@ Cedric Dewijs <cedric.dewijs@telfort.nl>
Stefan Stolz <st.stolz@gmail.com>
for suggesting to make the SVDRP command LSTR optionally list the actual file name of
a recording's directory
Malte Forkel <malte.forkel@berlin.de>
for suggesting to make the SVDRP command NEWT no longer check whether a timer with the
given data already exists

View File

@ -7527,3 +7527,5 @@ Video Disk Recorder Revision History
if an actual value has been entered (suggested by Ulf Kiener).
- The last replayed recording is now stored in setup.conf, which allows the blue
"Resume" key in the main menu to work even after a restart of VDR.
- The SVDRP command NEWT no longer checks whether a timer with the given data already
exists (suggested by Malte Forkel).

20
svdrp.c
View File

@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
* $Id: svdrp.c 2.22 2013/01/15 13:21:10 kls Exp $
* $Id: svdrp.c 2.23 2013/01/17 15:19:02 kls Exp $
*/
#include "svdrp.h"
@ -263,8 +263,7 @@ const char *HelpPages[] = {
" by the LSTC command.",
"NEWT <settings>\n"
" Create a new timer. Settings must be in the same format as returned\n"
" by the LSTT command. It is an error if a timer with the same channel,\n"
" day, start and stop time already exists.",
" by the LSTT command.",
"NEXT [ abs | rel ]\n"
" Show the next timer event. If no option is given, the output will be\n"
" in human readable form. With option 'abs' the absolute time of the next\n"
@ -1350,16 +1349,11 @@ void cSVDRP::CmdNEWT(const char *Option)
if (*Option) {
cTimer *timer = new cTimer;
if (timer->Parse(Option)) {
cTimer *t = Timers.GetTimer(timer);
if (!t) {
Timers.Add(timer);
Timers.SetModified();
isyslog("timer %s added", *timer->ToDescr());
Reply(250, "%d %s", timer->Index() + 1, *timer->ToText());
return;
}
else
Reply(550, "Timer already defined: %d %s", t->Index() + 1, *t->ToText());
Timers.Add(timer);
Timers.SetModified();
isyslog("timer %s added", *timer->ToDescr());
Reply(250, "%d %s", timer->Index() + 1, *timer->ToText());
return;
}
else
Reply(501, "Error in timer settings");