mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Rework cRecManager::UserDefinedTime
This commit is contained in:
parent
c4e25b899c
commit
fd7b1b9ab7
21
recmanager.c
21
recmanager.c
@ -849,32 +849,23 @@ const cEvent **cRecManager::UserDefinedTime(int userTime, int &numResults) {
|
|||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
|
const cChannels* channels = Channels;
|
||||||
LOCK_SCHEDULES_READ;
|
LOCK_SCHEDULES_READ;
|
||||||
// const cChannels* channels = Channels;
|
|
||||||
const cSchedules* schedules = Schedules;
|
const cSchedules* schedules = Schedules;
|
||||||
#else
|
#else
|
||||||
|
cChannels* channels = &Channels;
|
||||||
cSchedulesLock schedulesLock;
|
cSchedulesLock schedulesLock;
|
||||||
const cSchedules *schedules = cSchedules::Schedules(schedulesLock);
|
const cSchedules *schedules = cSchedules::Schedules(schedulesLock);
|
||||||
#endif
|
#endif
|
||||||
const cChannel *startChannel = NULL, *stopChannel = NULL;
|
const cChannel *startChannel = NULL, *stopChannel = NULL;
|
||||||
if (tvguideConfig.favLimitChannels) {
|
if (tvguideConfig.favLimitChannels) {
|
||||||
#if VDRVERSNUM >= 20301
|
startChannel = channels->GetByNumber(tvguideConfig.favStartChannel);
|
||||||
startChannel = Channels->GetByNumber(tvguideConfig.favStartChannel);
|
stopChannel = channels->GetByNumber(tvguideConfig.favStopChannel);
|
||||||
stopChannel = Channels->GetByNumber(tvguideConfig.favStopChannel);
|
|
||||||
}
|
}
|
||||||
if (!startChannel)
|
if (!startChannel)
|
||||||
startChannel = Channels->First();
|
startChannel = channels->First();
|
||||||
|
|
||||||
for (const cChannel *channel = startChannel; channel; channel = Channels->Next(channel)) {
|
for (const cChannel *channel = startChannel; channel; channel = channels->Next(channel)) {
|
||||||
#else
|
|
||||||
startChannel = Channels.GetByNumber(tvguideConfig.favStartChannel);
|
|
||||||
stopChannel = Channels.GetByNumber(tvguideConfig.favStopChannel);
|
|
||||||
}
|
|
||||||
if (!startChannel)
|
|
||||||
startChannel = Channels.First();
|
|
||||||
|
|
||||||
for (const cChannel *channel = startChannel; channel; channel = Channels.Next(channel)) {
|
|
||||||
#endif
|
|
||||||
if (channel->GroupSep()) continue;
|
if (channel->GroupSep()) continue;
|
||||||
const cSchedule *Schedule = schedules->GetSchedule(channel);
|
const cSchedule *Schedule = schedules->GetSchedule(channel);
|
||||||
if (!Schedule) continue;
|
if (!Schedule) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user