diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-05-28 10:48:50 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-05-28 10:48:50 +0200 |
commit | e892171736157127d1ca8fd6b5c6193eb5b55c53 (patch) | |
tree | f0896244778df5d2129753d88b1f497b8a4e8fcb /channels.c | |
parent | 39162a98f081d997ad34c1d8dfb48111176eac15 (diff) | |
download | vdr-e892171736157127d1ca8fd6b5c6193eb5b55c53.tar.gz vdr-e892171736157127d1ca8fd6b5c6193eb5b55c53.tar.bz2 |
Fixed deleting channels in case the current channel's number changes1.4.0-2
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 1.51 2006/04/17 12:18:57 kls Exp $ + * $Id: channels.c 1.52 2006/05/28 10:14:18 kls Exp $ */ #include "channels.h" @@ -925,6 +925,17 @@ int cChannels::GetNextNormal(int Idx) return channel ? Idx : -1; } +#if APIVERSNUM != 10400 +#warning ******* API version changed - activate new code +int cChannels::GetPrevNormal(int Idx) +{ + cChannel *channel = Get(--Idx); + while (channel && channel->GroupSep()) + channel = Get(--Idx); + return channel ? Idx : -1; +} +#endif + void cChannels::ReNumber( void ) { channelsHashSid.Clear(); |