Fixed moving channels, which sometimes stopped the current replay session

This commit is contained in:
Klaus Schmidinger 2006-05-28 09:19:30 +02:00
parent 9b3b98f88f
commit 39162a98f0
4 changed files with 21 additions and 4 deletions

View File

@ -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 <mrak@gmx.de>
for translating OSD texts to the Polish language

View File

@ -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).

View File

@ -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

13
menu.c
View File

@ -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
}
}
}