diff options
author | Frank Neumann <fnu@yavdr.org> | 2017-05-01 11:02:21 +0200 |
---|---|---|
committer | Frank Neumann <fnu@yavdr.org> | 2017-05-01 11:02:21 +0200 |
commit | a46c7161bddc00b5b11bda0f8a14066b5f837302 (patch) | |
tree | 48e50b78f0efb1120b39bfb07f3612aabb1541e6 /menu_timersdone.c | |
parent | 0b09f90f361454d1d422cc750ee84359f11bd378 (diff) | |
download | vdr-plugin-epgsearch-a46c7161bddc00b5b11bda0f8a14066b5f837302.tar.gz vdr-plugin-epgsearch-a46c7161bddc00b5b11bda0f8a14066b5f837302.tar.bz2 |
Add compatibility for VDR 2.3.2+ (thx kamel5, mini73 & TomJoad)
Diffstat (limited to 'menu_timersdone.c')
-rw-r--r-- | menu_timersdone.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/menu_timersdone.c b/menu_timersdone.c index a239892..6eb370d 100644 --- a/menu_timersdone.c +++ b/menu_timersdone.c @@ -44,7 +44,13 @@ void cMenuTimerDoneItem::Set(void) tm *tm = localtime_r(&timerDone->start, &tm_r); strftime(buf, sizeof(buf), "%d.%m.%y %H:%M", tm); - const cChannel* ch = Channels.GetByChannelID(timerDone->channelID, true, true); +#if VDRVERSNUM > 20300 + LOCK_CHANNELS_READ; + const cChannels *vdrchannels = Channels; +#else + cChannels *vdrchannels = &Channels; +#endif + const cChannel* ch = vdrchannels->GetByChannelID(timerDone->channelID, true, true); msprintf(&buffer, "%d\t%s\t%s~%s", ch?ch->Number():0, buf, timerDone->title.c_str(), timerDone->shorttext.c_str()); SetText(buffer, false); } |