mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Applied the fixes to moving and deleting channels from version 1.4.0-2 to the SVDRP commands MOVC and DELC as well
This commit is contained in:
parent
833d649e13
commit
dc6666d53c
4
HISTORY
4
HISTORY
@ -4746,7 +4746,7 @@ Video Disk Recorder Revision History
|
||||
- Fixed deleting channels in case the current channel's number changes (reported
|
||||
by Mirko Dölle).
|
||||
|
||||
2006-06-02: Version 1.4.0-3
|
||||
2006-06-03: Version 1.4.0-3
|
||||
|
||||
- Fixed the PremiereContentTransmissionDescriptor in 'libsi' (thanks to Stefan
|
||||
Huelswitt).
|
||||
@ -4758,3 +4758,5 @@ Video Disk Recorder Revision History
|
||||
presumably a NOP, anyway.
|
||||
- Fixed the 'clean-plugins' target in the Makefile to also remove additional
|
||||
plugin libraries (thanks to Wayne Keer).
|
||||
- Applied the fixes to moving and deleting channels from version 1.4.0-2 to the
|
||||
SVDRP commands MOVC and DELC as well.
|
||||
|
25
svdrp.c
25
svdrp.c
@ -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 1.95 2006/04/17 09:02:23 kls Exp $
|
||||
* $Id: svdrp.c 1.96 2006/06/03 09:17:17 kls Exp $
|
||||
*/
|
||||
|
||||
#include "svdrp.h"
|
||||
@ -550,10 +550,25 @@ void cSVDRP::CmdDELC(const char *Option)
|
||||
return;
|
||||
}
|
||||
}
|
||||
int CurrentChannelNr = cDevice::CurrentChannel();
|
||||
cChannel *CurrentChannel = Channels.GetByNumber(CurrentChannelNr);
|
||||
if (CurrentChannel && channel == CurrentChannel) {
|
||||
int n = Channels.GetNextNormal(CurrentChannel->Index());
|
||||
if (n < 0)
|
||||
n = Channels.GetPrevNormal(CurrentChannel->Index());
|
||||
CurrentChannel = Channels.Get(n);
|
||||
CurrentChannelNr = 0; // triggers channel switch below
|
||||
}
|
||||
Channels.Del(channel);
|
||||
Channels.ReNumber();
|
||||
Channels.SetModified(true);
|
||||
isyslog("channel %s deleted", Option);
|
||||
if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) {
|
||||
if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring())
|
||||
Channels.SwitchTo(CurrentChannel->Number());
|
||||
else
|
||||
cDevice::SetCurrentChannel(CurrentChannel);
|
||||
}
|
||||
Reply(250, "Channel \"%s\" deleted", Option);
|
||||
}
|
||||
else
|
||||
@ -1158,8 +1173,12 @@ void cSVDRP::CmdMOVC(const char *Option)
|
||||
Channels.Move(FromChannel, ToChannel);
|
||||
Channels.ReNumber();
|
||||
Channels.SetModified(true);
|
||||
if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr)
|
||||
Channels.SwitchTo(CurrentChannel->Number());
|
||||
if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) {
|
||||
if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring())
|
||||
Channels.SwitchTo(CurrentChannel->Number());
|
||||
else
|
||||
cDevice::SetCurrentChannel(CurrentChannel);
|
||||
}
|
||||
isyslog("channel %d moved to %d", FromNumber, ToNumber);
|
||||
Reply(250,"Channel \"%d\" moved to \"%d\"", From, To);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user