summaryrefslogtreecommitdiff
path: root/display.c
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-05-23 22:01:00 +0200
committerFrank Neumann <fnu@yavdr.org>2017-05-23 22:01:00 +0200
commit8a391eb9aab910ada9067b94f67da397524ed215 (patch)
treea612969cf99db503ae90e418dc56a0c68e9dbdd2 /display.c
parentd4572192c5709b1a09c85a9f07844fde3ffeb65c (diff)
downloadvdr-plugin-text2skin-8a391eb9aab910ada9067b94f67da397524ed215.tar.gz
vdr-plugin-text2skin-8a391eb9aab910ada9067b94f67da397524ed215.tar.bz2
Add VDR API 2.3.1 compatibility for "New token: ChannelServiceReference".
Diffstat (limited to 'display.c')
-rw-r--r--display.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/display.c b/display.c
index 82ff836..bc10bd1 100644
--- a/display.c
+++ b/display.c
@@ -1263,14 +1263,24 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token)
case tChannelServiceReference:
if (mEvent) { // extended EPG
+#if APIVERSNUM < 20301
cChannel *channel = Channels.GetByChannelID(mEvent->ChannelID(), true);
+#else
+ LOCK_CHANNELS_READ;
+ const cChannel *channel = Channels->GetByChannelID(mEvent->ChannelID(), true);
+#endif
return channel != NULL
? (cxType)ChannelServiceReference(channel, 0)
: (cxType)false;
}
else if (mRecording) { // recording Info
cRecordingInfo *recInfo = const_cast<cRecordingInfo*>(mRecording->Info());
+#if APIVERSNUM < 20301
cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID(), true);
+#else
+ LOCK_CHANNELS_READ;
+ const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID(), true);
+#endif
return channel != NULL
? (cxType)ChannelServiceReference(channel, 0)
: (cxType)false;