mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented the SVDRP command MOVC
This commit is contained in:
parent
06117cbaab
commit
9e864aba12
@ -830,6 +830,7 @@ Andreas Brachold <vdr04@deltab.de>
|
|||||||
umask settings
|
umask settings
|
||||||
for reporting that there are empty info.vdr files created if there is no EPG
|
for reporting that there are empty info.vdr files created if there is no EPG
|
||||||
info available
|
info available
|
||||||
|
for implementing the SVDRP command MOVC
|
||||||
|
|
||||||
Manuel Hartl <icecep@gmx.net>
|
Manuel Hartl <icecep@gmx.net>
|
||||||
for suggesting to extend the logging info when starting/stopping timers
|
for suggesting to extend the logging info when starting/stopping timers
|
||||||
|
1
HISTORY
1
HISTORY
@ -3789,3 +3789,4 @@ Video Disk Recorder Revision History
|
|||||||
creates a VDR that always behaves as if it were called with '--vfat'.
|
creates a VDR that always behaves as if it were called with '--vfat'.
|
||||||
- Replaced the ':' delimiter between hour and minute in recording file names with
|
- Replaced the ':' delimiter between hour and minute in recording file names with
|
||||||
a '.' under Linux, too. Existing recordings with ':' as delimiter will still work.
|
a '.' under Linux, too. Existing recordings with ':' as delimiter will still work.
|
||||||
|
- Implemented the SVDRP command MOVC (thanks to Andreas Brachold).
|
||||||
|
49
svdrp.c
49
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.79 2005/09/03 12:46:57 kls Exp $
|
* $Id: svdrp.c 1.80 2005/09/03 14:09:02 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "svdrp.h"
|
#include "svdrp.h"
|
||||||
@ -1039,8 +1039,51 @@ void cSVDRP::CmdMODT(const char *Option)
|
|||||||
|
|
||||||
void cSVDRP::CmdMOVC(const char *Option)
|
void cSVDRP::CmdMOVC(const char *Option)
|
||||||
{
|
{
|
||||||
//TODO combine this with menu action (timers must be updated)
|
if (*Option) {
|
||||||
Reply(502, "MOVC not yet implemented");
|
if (!Channels.BeingEdited() && !Timers.BeingEdited()) {
|
||||||
|
char *tail;
|
||||||
|
int From = strtol(Option, &tail, 10);
|
||||||
|
if (tail && tail != Option) {
|
||||||
|
tail = skipspace(tail);
|
||||||
|
if (tail && tail != Option) {
|
||||||
|
int To = strtol(tail, NULL, 10);
|
||||||
|
int CurrentChannelNr = cDevice::CurrentChannel();
|
||||||
|
cChannel *CurrentChannel = Channels.GetByNumber(CurrentChannelNr);
|
||||||
|
cChannel *FromChannel = Channels.GetByNumber(From);
|
||||||
|
if (FromChannel) {
|
||||||
|
cChannel *ToChannel = Channels.GetByNumber(To);
|
||||||
|
if (ToChannel) {
|
||||||
|
int FromNumber = FromChannel->Number();
|
||||||
|
int ToNumber = ToChannel->Number();
|
||||||
|
if (FromNumber != ToNumber) {
|
||||||
|
Channels.Move(FromChannel, ToChannel);
|
||||||
|
Channels.ReNumber();
|
||||||
|
Channels.SetModified(true);
|
||||||
|
if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr)
|
||||||
|
Channels.SwitchTo(CurrentChannel->Number());
|
||||||
|
isyslog("channel %d moved to %d", FromNumber, ToNumber);
|
||||||
|
Reply(250,"Channel \"%d\" moved to \"%d\"", From, To);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(501, "Can't move channel to same postion");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(501, "Channel \"%d\" not defined", To);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(501, "Channel \"%d\" not defined", From);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(501, "Error in channel number");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(501, "Error in channel number");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(550, "Channels or timers are being edited - try again later");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Reply(501, "Missing channel number");
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSVDRP::CmdMOVT(const char *Option)
|
void cSVDRP::CmdMOVT(const char *Option)
|
||||||
|
Loading…
Reference in New Issue
Block a user