Updated hasTimer

This commit is contained in:
kamel5 2018-04-01 17:23:52 +02:00 committed by kamel5
parent aa26a69ef8
commit b054fa2c12
2 changed files with 17 additions and 1 deletions

View File

@ -6,6 +6,14 @@ cChannelColumn::cChannelColumn(int num, const cChannel *channel, cMyTime *myTime
this->num = num;
this->myTime = myTime;
#if VDRVERSNUM >= 20301
hasTimer = false;
const cSchedule *Schedule = NULL;
LOCK_SCHEDULES_READ;
const cSchedules* schedules = Schedules;
if (schedules) {
Schedule = schedules->GetSchedule(channel);
hasTimer = Schedule ? Schedule->HasTimer() : false;
}
#else
hasTimer = channel->HasTimer();
#endif
@ -376,6 +384,14 @@ cGrid *cChannelColumn::addDummyGrid(time_t start, time_t end, cGrid *firstGrid,
void cChannelColumn::SetTimers() {
#if VDRVERSNUM >= 20301
hasTimer = false;
const cSchedule *Schedule = NULL;
LOCK_SCHEDULES_READ;
const cSchedules* schedules = Schedules;
if (schedules) {
Schedule = schedules->GetSchedule(channel);
hasTimer = Schedule ? Schedule->HasTimer() : false;
}
#else
hasTimer = channel->HasTimer();
#endif

View File

@ -69,7 +69,7 @@ void cEpgGrid::SetTimer() {
hasTimer = true;
else
hasTimer = false;
#if VDRVERSNUM >= 20301
#if VDRVERSNUM >= 20401
} else if (event->HasTimer()) {
hasTimer = true;
#else