1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

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> Stefan Stolz <st.stolz@gmail.com>
for suggesting to make the SVDRP command LSTR optionally list the actual file name of for suggesting to make the SVDRP command LSTR optionally list the actual file name of
a recording's directory 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). 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 - 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. "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 * and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection. * 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" #include "svdrp.h"
@ -263,8 +263,7 @@ const char *HelpPages[] = {
" by the LSTC command.", " by the LSTC command.",
"NEWT <settings>\n" "NEWT <settings>\n"
" Create a new timer. Settings must be in the same format as returned\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" " by the LSTT command.",
" day, start and stop time already exists.",
"NEXT [ abs | rel ]\n" "NEXT [ abs | rel ]\n"
" Show the next timer event. If no option is given, the output will be\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" " 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) { if (*Option) {
cTimer *timer = new cTimer; cTimer *timer = new cTimer;
if (timer->Parse(Option)) { if (timer->Parse(Option)) {
cTimer *t = Timers.GetTimer(timer); Timers.Add(timer);
if (!t) { Timers.SetModified();
Timers.Add(timer); isyslog("timer %s added", *timer->ToDescr());
Timers.SetModified(); Reply(250, "%d %s", timer->Index() + 1, *timer->ToText());
isyslog("timer %s added", *timer->ToDescr()); return;
Reply(250, "%d %s", timer->Index() + 1, *timer->ToText());
return;
}
else
Reply(550, "Timer already defined: %d %s", t->Index() + 1, *t->ToText());
} }
else else
Reply(501, "Error in timer settings"); Reply(501, "Error in timer settings");