mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
GetLastValidChannel
This commit is contained in:
parent
1df9641621
commit
700543b394
@ -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) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <vdr/channels.h>
|
||||
#include "config.h"
|
||||
#include "channelgroup.h"
|
||||
|
||||
// --- cChannelGroups -------------------------------------------------------------
|
||||
|
@ -10,16 +10,7 @@ cChannelJump::cChannelJump(cChannelGroups *channelGroups) {
|
||||
this->channelGroups = channelGroups;
|
||||
pixmapText = NULL;
|
||||
channel = 0;
|
||||
if (!config.hideLastGroup) {
|
||||
#if VDRVERSNUM >= 20301
|
||||
LOCK_CHANNELS_READ;
|
||||
maxChannels = Channels->MaxNumber();
|
||||
#else
|
||||
maxChannels = Channels.MaxNumber();
|
||||
#endif
|
||||
} else {
|
||||
maxChannels = channelGroups->GetLastValidChannel();
|
||||
}
|
||||
maxChannels = channelGroups->GetLastValidChannel();
|
||||
timeout = Setup.ChannelEntryTimeout;
|
||||
startTime = cTimeMs::Now();
|
||||
SetPixmaps();
|
||||
|
Loading…
Reference in New Issue
Block a user