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 <vector>
|
||||||
|
#include "config.h"
|
||||||
#include "channelgroups.h"
|
#include "channelgroups.h"
|
||||||
|
|
||||||
cChannelGroups::cChannelGroups(void) {
|
cChannelGroups::cChannelGroups(void) {
|
||||||
@ -145,9 +146,15 @@ void cChannelGroups::CreateGroupGrid(const char *name, int number, int start, in
|
|||||||
}
|
}
|
||||||
|
|
||||||
int cChannelGroups::GetLastValidChannel(void) {
|
int cChannelGroups::GetLastValidChannel(void) {
|
||||||
if (channelGroups.size() > 0)
|
if (config.hideLastGroup && channelGroups.size() > 0) {
|
||||||
return channelGroups[channelGroups.size()-1].StopChannel();
|
return channelGroups[channelGroups.size() - 1].StopChannel();
|
||||||
return 0;
|
}
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
|
LOCK_CHANNELS_READ;
|
||||||
|
return Channels->MaxNumber();
|
||||||
|
#else
|
||||||
|
return Channels.MaxNumber();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void cChannelGroups::DumpGroups(void) {
|
void cChannelGroups::DumpGroups(void) {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <vdr/channels.h>
|
#include <vdr/channels.h>
|
||||||
|
#include "config.h"
|
||||||
#include "channelgroup.h"
|
#include "channelgroup.h"
|
||||||
|
|
||||||
// --- cChannelGroups -------------------------------------------------------------
|
// --- cChannelGroups -------------------------------------------------------------
|
||||||
|
@ -10,16 +10,7 @@ cChannelJump::cChannelJump(cChannelGroups *channelGroups) {
|
|||||||
this->channelGroups = channelGroups;
|
this->channelGroups = channelGroups;
|
||||||
pixmapText = NULL;
|
pixmapText = NULL;
|
||||||
channel = 0;
|
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;
|
timeout = Setup.ChannelEntryTimeout;
|
||||||
startTime = cTimeMs::Now();
|
startTime = cTimeMs::Now();
|
||||||
SetPixmaps();
|
SetPixmaps();
|
||||||
|
Loading…
Reference in New Issue
Block a user