summaryrefslogtreecommitdiff
path: root/menu_timersdone.c
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-05-01 11:02:21 +0200
committerFrank Neumann <fnu@yavdr.org>2017-05-01 11:02:21 +0200
commita46c7161bddc00b5b11bda0f8a14066b5f837302 (patch)
tree48e50b78f0efb1120b39bfb07f3612aabb1541e6 /menu_timersdone.c
parent0b09f90f361454d1d422cc750ee84359f11bd378 (diff)
downloadvdr-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.c8
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);
}