From 8a391eb9aab910ada9067b94f67da397524ed215 Mon Sep 17 00:00:00 2001 From: Frank Neumann Date: Tue, 23 May 2017 22:01:00 +0200 Subject: Add VDR API 2.3.1 compatibility for "New token: ChannelServiceReference". --- display.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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(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; -- cgit v1.2.3