diff options
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) { |