diff options
author | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:57:17 +0100 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:57:17 +0100 |
commit | 2ec54f75051001accc03c32b42df70cd4a19febd (patch) | |
tree | 836d96c9a4688a01745719787a7a0e83804356f8 /server/menuHTTP.c | |
parent | e0a00f90aece9cfc54f3d5a1d9098fa29d9dc468 (diff) | |
download | vdr-plugin-streamdev-2ec54f75051001accc03c32b42df70cd4a19febd.tar.gz vdr-plugin-streamdev-2ec54f75051001accc03c32b42df70cd4a19febd.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 5fb5010..d7fb817 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; } |