mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Now checking whether timers or channels are currently being edited via the menu before making changes through SVDRP
This commit is contained in:
parent
d6b8a28329
commit
068e17303c
@ -1277,6 +1277,8 @@ Andreas Brugger <brougs78@gmx.net>
|
|||||||
for reporting a possible crash when pausing live video and the recording was
|
for reporting a possible crash when pausing live video and the recording was
|
||||||
unable to start, maybe because there was no lock on the device
|
unable to start, maybe because there was no lock on the device
|
||||||
for reporting the missing Euro sign in iso8859-1
|
for reporting the missing Euro sign in iso8859-1
|
||||||
|
for reporting a problem with making changes to timers through SVDRP while they
|
||||||
|
are being edited via the menu
|
||||||
|
|
||||||
Dino Ravnic <dino.ravnic@fer.hr>
|
Dino Ravnic <dino.ravnic@fer.hr>
|
||||||
for fixing some characters in the iso8859-2 font file
|
for fixing some characters in the iso8859-2 font file
|
||||||
|
3
HISTORY
3
HISTORY
@ -3650,3 +3650,6 @@ Video Disk Recorder Revision History
|
|||||||
PUTE SVDRP command (thanks to Olaf Titz for reporting this one).
|
PUTE SVDRP command (thanks to Olaf Titz for reporting this one).
|
||||||
- Added the command line options '--lirc', '--rcu' and '--no-kbd' to allow setting
|
- Added the command line options '--lirc', '--rcu' and '--no-kbd' to allow setting
|
||||||
the remote control at runtime (based on a patch by Darren Salt).
|
the remote control at runtime (based on a patch by Darren Salt).
|
||||||
|
- Now checking whether timers or channels are currently being edited via the menu
|
||||||
|
before making changes through SVDRP (thanks to Andreas Brugger for reporting a
|
||||||
|
problem with this).
|
||||||
|
22
svdrp.c
22
svdrp.c
@ -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 1.72 2005/05/26 09:59:09 kls Exp $
|
* $Id: svdrp.c 1.73 2005/07/31 14:31:45 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "svdrp.h"
|
#include "svdrp.h"
|
||||||
@ -476,6 +476,7 @@ void cSVDRP::CmdDELC(const char *Option)
|
|||||||
{
|
{
|
||||||
if (*Option) {
|
if (*Option) {
|
||||||
if (isnumber(Option)) {
|
if (isnumber(Option)) {
|
||||||
|
if (!Channels.BeingEdited()) {
|
||||||
cChannel *channel = Channels.GetByNumber(strtol(Option, NULL, 10));
|
cChannel *channel = Channels.GetByNumber(strtol(Option, NULL, 10));
|
||||||
if (channel) {
|
if (channel) {
|
||||||
for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) {
|
for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) {
|
||||||
@ -493,6 +494,9 @@ void cSVDRP::CmdDELC(const char *Option)
|
|||||||
else
|
else
|
||||||
Reply(501, "Channel \"%s\" not defined", Option);
|
Reply(501, "Channel \"%s\" not defined", Option);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Reply(550, "Channels are being edited - try again later");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Reply(501, "Error in channel number \"%s\"", Option);
|
Reply(501, "Error in channel number \"%s\"", Option);
|
||||||
}
|
}
|
||||||
@ -532,6 +536,7 @@ void cSVDRP::CmdDELT(const char *Option)
|
|||||||
{
|
{
|
||||||
if (*Option) {
|
if (*Option) {
|
||||||
if (isnumber(Option)) {
|
if (isnumber(Option)) {
|
||||||
|
if (!Timers.BeingEdited()) {
|
||||||
cTimer *timer = Timers.Get(strtol(Option, NULL, 10) - 1);
|
cTimer *timer = Timers.Get(strtol(Option, NULL, 10) - 1);
|
||||||
if (timer) {
|
if (timer) {
|
||||||
if (!timer->Recording()) {
|
if (!timer->Recording()) {
|
||||||
@ -546,6 +551,9 @@ void cSVDRP::CmdDELT(const char *Option)
|
|||||||
else
|
else
|
||||||
Reply(501, "Timer \"%s\" not defined", Option);
|
Reply(501, "Timer \"%s\" not defined", Option);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Reply(550, "Timers are being edited - try again later");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Reply(501, "Error in timer number \"%s\"", Option);
|
Reply(501, "Error in timer number \"%s\"", Option);
|
||||||
}
|
}
|
||||||
@ -880,6 +888,7 @@ void cSVDRP::CmdMODC(const char *Option)
|
|||||||
int n = strtol(Option, &tail, 10);
|
int n = strtol(Option, &tail, 10);
|
||||||
if (tail && tail != Option) {
|
if (tail && tail != Option) {
|
||||||
tail = skipspace(tail);
|
tail = skipspace(tail);
|
||||||
|
if (!Channels.BeingEdited()) {
|
||||||
cChannel *channel = Channels.GetByNumber(n);
|
cChannel *channel = Channels.GetByNumber(n);
|
||||||
if (channel) {
|
if (channel) {
|
||||||
cChannel ch;
|
cChannel ch;
|
||||||
@ -900,6 +909,9 @@ void cSVDRP::CmdMODC(const char *Option)
|
|||||||
else
|
else
|
||||||
Reply(501, "Channel \"%d\" not defined", n);
|
Reply(501, "Channel \"%d\" not defined", n);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Reply(550, "Channels are being edited - try again later");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Reply(501, "Error in channel number");
|
Reply(501, "Error in channel number");
|
||||||
}
|
}
|
||||||
@ -914,6 +926,7 @@ void cSVDRP::CmdMODT(const char *Option)
|
|||||||
int n = strtol(Option, &tail, 10);
|
int n = strtol(Option, &tail, 10);
|
||||||
if (tail && tail != Option) {
|
if (tail && tail != Option) {
|
||||||
tail = skipspace(tail);
|
tail = skipspace(tail);
|
||||||
|
if (!Timers.BeingEdited()) {
|
||||||
cTimer *timer = Timers.Get(n - 1);
|
cTimer *timer = Timers.Get(n - 1);
|
||||||
if (timer) {
|
if (timer) {
|
||||||
cTimer t = *timer;
|
cTimer t = *timer;
|
||||||
@ -933,6 +946,9 @@ void cSVDRP::CmdMODT(const char *Option)
|
|||||||
else
|
else
|
||||||
Reply(501, "Timer \"%d\" not defined", n);
|
Reply(501, "Timer \"%d\" not defined", n);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Reply(550, "Timers are being edited - try again later");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Reply(501, "Error in timer number");
|
Reply(501, "Error in timer number");
|
||||||
}
|
}
|
||||||
@ -1054,6 +1070,7 @@ void cSVDRP::CmdUPDT(const char *Option)
|
|||||||
if (*Option) {
|
if (*Option) {
|
||||||
cTimer *timer = new cTimer;
|
cTimer *timer = new cTimer;
|
||||||
if (timer->Parse(Option)) {
|
if (timer->Parse(Option)) {
|
||||||
|
if (!Timers.BeingEdited()) {
|
||||||
cTimer *t = Timers.GetTimer(timer);
|
cTimer *t = Timers.GetTimer(timer);
|
||||||
if (t) {
|
if (t) {
|
||||||
t->Parse(Option);
|
t->Parse(Option);
|
||||||
@ -1069,6 +1086,9 @@ void cSVDRP::CmdUPDT(const char *Option)
|
|||||||
Reply(250, "%d %s", timer->Index() + 1, *timer->ToText());
|
Reply(250, "%d %s", timer->Index() + 1, *timer->ToText());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Reply(550, "Timers are being edited - try again later");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Reply(501, "Error in timer settings");
|
Reply(501, "Error in timer settings");
|
||||||
delete timer;
|
delete timer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user