diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-07-11 12:41:19 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-07-11 13:20:23 +0200 |
commit | 700543b394c4e87e3bc372fb00c221c456c2adf2 (patch) | |
tree | 0302ce7047672beca04c56f4f8a07a08f43d6915 /channelgroups.c | |
parent | 1df9641621203b9eeb87c269c9e962691398e010 (diff) | |
download | vdr-plugin-tvguide-700543b394c4e87e3bc372fb00c221c456c2adf2.tar.gz vdr-plugin-tvguide-700543b394c4e87e3bc372fb00c221c456c2adf2.tar.bz2 |
GetLastValidChannel
Diffstat (limited to 'channelgroups.c')
-rw-r--r-- | channelgroups.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/channelgroups.c b/channelgroups.c index 8447ba4..bd9f8f5 100644 --- a/channelgroups.c +++ b/channelgroups.c @@ -1,4 +1,5 @@ #include <vector> +#include "config.h" #include "channelgroups.h" cChannelGroups::cChannelGroups(void) { @@ -145,9 +146,15 @@ void cChannelGroups::CreateGroupGrid(const char *name, int number, int start, in } int cChannelGroups::GetLastValidChannel(void) { - if (channelGroups.size() > 0) - return channelGroups[channelGroups.size()-1].StopChannel(); - return 0; + if (config.hideLastGroup && channelGroups.size() > 0) { + return channelGroups[channelGroups.size() - 1].StopChannel(); + } +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + return Channels->MaxNumber(); +#else + return Channels.MaxNumber(); +#endif } void cChannelGroups::DumpGroups(void) { |