From b054fa2c12f58e2b406be903d92e81f1013e526b Mon Sep 17 00:00:00 2001 From: kamel5 Date: Sun, 1 Apr 2018 17:23:52 +0200 Subject: [PATCH] Updated hasTimer --- channelcolumn.c | 16 ++++++++++++++++ epggrid.c | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/channelcolumn.c b/channelcolumn.c index acedc01..f43f33c 100644 --- a/channelcolumn.c +++ b/channelcolumn.c @@ -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 diff --git a/epggrid.c b/epggrid.c index 9b296b7..9b6ef1a 100644 --- a/epggrid.c +++ b/epggrid.c @@ -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