diff options
author | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:39:01 +0100 |
---|---|---|
committer | Mikko Matilainen <mikkom@iki.fi> | 2011-03-24 19:20:05 +0200 |
commit | 635ccc479f3e0d62b3f52cb5407d06185e402f5b (patch) | |
tree | 8f56fa909f40656a130f41e3cab4898093fdb0e5 /server/menuHTTP.c | |
parent | db3274c046f4e2d44cb8263428073b6a43dca2fa (diff) | |
download | vdr-plugin-streamdev-635ccc479f3e0d62b3f52cb5407d06185e402f5b.tar.gz vdr-plugin-streamdev-635ccc479f3e0d62b3f52cb5407d06185e402f5b.tar.bz2 |
Snapshot 2010-09-15
Diffstat (limited to 'server/menuHTTP.c')
-rw-r--r-- | server/menuHTTP.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/server/menuHTTP.c b/server/menuHTTP.c index 47df3a8..1d30aa1 100644 --- a/server/menuHTTP.c +++ b/server/menuHTTP.c @@ -2,7 +2,7 @@ #include "server/menuHTTP.h" //**************************** cChannelIterator ************** -cChannelIterator::cChannelIterator(cChannel *First): channel(First) +cChannelIterator::cChannelIterator(const cChannel *First): channel(First) {} const cChannel* cChannelIterator::Next() @@ -19,7 +19,7 @@ cListAll::cListAll(): cChannelIterator(Channels.First()) const cChannel* cListAll::NextChannel(const cChannel *Channel) { if (Channel) - Channel = Channels.Next(Channel); + Channel = SkipFakeGroups(Channels.Next(Channel)); return Channel; } @@ -46,14 +46,19 @@ const cChannel* cListGroups::NextChannel(const cChannel *Channel) } // // ********************* cListGroup **************** -cListGroup::cListGroup(const cChannel *Group): cChannelIterator((Group && Group->GroupSep() && Channels.Next(Group) && !Channels.Next(Group)->GroupSep()) ? Channels.Next(Group) : NULL) +cListGroup::cListGroup(const cChannel *Group): cChannelIterator(GetNextChannelInGroup(Group)) {} -const cChannel* cListGroup::NextChannel(const cChannel *Channel) +const cChannel* cListGroup::GetNextChannelInGroup(const cChannel *Channel) { if (Channel) - Channel = Channels.Next(Channel); - return (Channel && !Channel->GroupSep()) ? Channel : NULL; + Channel = SkipFakeGroups(Channels.Next(Channel)); + return Channel && !Channel->GroupSep() ? Channel : NULL; +} + +const cChannel* cListGroup::NextChannel(const cChannel *Channel) +{ + return GetNextChannelInGroup(Channel); } // // ********************* cListTree **************** @@ -68,7 +73,7 @@ const cChannel* cListTree::NextChannel(const cChannel *Channel) if (currentGroup == selectedGroup) { if (Channel) - Channel = Channels.Next(Channel); + Channel = SkipFakeGroups(Channels.Next(Channel)); if (Channel && Channel->GroupSep()) currentGroup = Channel; } |