diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a1c27e08..c7f51a3c 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -445,6 +445,7 @@ Mirko D for making the "Play" key in live viewing mode resume a previous replay session for suggesting to allow defining key macros for all non-modeless keys for reporting a bug in entering '0' in a cMenuEditIntItem + for reporting that moving channels sometimes stopped the current replay session Michael Rakowski for translating OSD texts to the Polish language diff --git a/HISTORY b/HISTORY index 831a5edc..e0c9b4ae 100644 --- a/HISTORY +++ b/HISTORY @@ -4741,3 +4741,5 @@ Video Disk Recorder Revision History - Avoiding a compiler warning in libsi's TypeLoop::operator[]. - Now processing the "frequency list descriptor" (based on a patch from Anssi Hannula). - Improved the repeat function for LIRC remote controls (thanks to Joerg Riechardt). +- Fixed moving channels, which sometimes stopped the current replay session + (reported by Mirko Dölle). diff --git a/device.h b/device.h index b9d1220c..7ff5d52e 100644 --- a/device.h +++ b/device.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 1.76 2006/05/26 12:46:59 kls Exp $ + * $Id: device.h 1.77 2006/05/28 09:19:30 kls Exp $ */ #ifndef __DEVICE_H @@ -239,6 +239,13 @@ protected: public: static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; } ///< Returns the number of the current channel on the primary device. +#if APIVERSNUM != 10400 +#warning ******* API version changed - activate new code + static void SetCurrentChannel(const cChannel *Channel) { currentChannel = Channel ? Channel->Number() : 0; } + ///< Sets the number of the current channel on the primary device, without + ///< actually switching to it. This can be used to correct the current + ///< channel number while replaying. +#endif void ForceTransferMode(void); ///< Forces the device into transfermode for the current channel. virtual bool HasLock(int TimeoutMs = 0);//XXX PLUGINS.html diff --git a/menu.c b/menu.c index 41947313..3f32adae 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.436 2006/05/25 12:24:53 kls Exp $ + * $Id: menu.c 1.437 2006/05/28 09:17:25 kls Exp $ */ #include "menu.h" @@ -530,8 +530,15 @@ void cMenuChannels::Move(int From, int To) cOsdMenu::Move(From, To); Propagate(); isyslog("channel %d moved to %d", FromNumber, ToNumber); - 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()); +#if APIVERSNUM != 10400 +#warning ******* API version changed - activate new code + else + cDevice::SetCurrentChannel(CurrentChannel); +#endif + } } }