diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2020-03-04 15:25:44 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2020-03-04 15:26:27 +0100 |
commit | f653594c4a82eef62ec16d9daab2f964f416a12e (patch) | |
tree | 600663e3534c0c3c4c16e37cc522e5d1fdbd2efa /timerconflict.c | |
parent | 8129d116fb6f8b2c77c9e3ad3dac7e18716b91f8 (diff) | |
download | vdr-plugin-tvguide-f653594c4a82eef62ec16d9daab2f964f416a12e.tar.gz vdr-plugin-tvguide-f653594c4a82eef62ec16d9daab2f964f416a12e.tar.bz2 |
Fixes for <VDR-2.3.1 compatibility
Diffstat (limited to 'timerconflict.c')
-rw-r--r-- | timerconflict.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/timerconflict.c b/timerconflict.c index 2aaef7a..4fcf605 100644 --- a/timerconflict.c +++ b/timerconflict.c @@ -84,11 +84,13 @@ void cTVGuideTimerConflicts::CalculateConflicts(void) { #if VDRVERSNUM >= 20301 LOCK_TIMERS_READ; const cTimers* timers = Timers; + for (int j=0; j < numTimers; j++) { + const cTimer *timer = timers->GetById(conflicts[i]->timerIDs[j] + 1); #else const cTimers* timers = &Timers; -#endif for (int j=0; j < numTimers; j++) { - const cTimer *timer = timers->GetById(conflicts[i]->timerIDs[j] + 1); + const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]); +#endif if (timer) { if (!unionSet) { unionSet = new cTimeInterval(timer->StartTime(), timer->StopTime()); @@ -107,7 +109,11 @@ void cTVGuideTimerConflicts::CalculateConflicts(void) { cTimeInterval *intersect = NULL; for (int j=0; j < numTimers; j++) { +#if VDRVERSNUM >= 20301 const cTimer *timer = timers->GetById(conflicts[i]->timerIDs[j] + 1); +#else + const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]); +#endif if (timer) { if (!intersect) { intersect = new cTimeInterval(timer->StartTime(), timer->StopTime()); |