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_switchtimers.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_switchtimers.c')
-rw-r--r-- | menu_switchtimers.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/menu_switchtimers.c b/menu_switchtimers.c index 1a8139a..7c1bc72 100644 --- a/menu_switchtimers.c +++ b/menu_switchtimers.c @@ -136,7 +136,13 @@ void cMenuSwitchTimerItem::Set() tm *tm = localtime_r(&startTime, &tm_r); strftime(datebuf, sizeof(datebuf), "%d.%m", tm); - cChannel* channel = Channels.GetByChannelID(switchTimer->channelID,true,true); +#if VDRVERSNUM > 20300 + LOCK_CHANNELS_READ; + const cChannels *vdrchannels = Channels; +#else + cChannels *vdrchannels = &Channels; +#endif + const cChannel* channel = vdrchannels->GetByChannelID(switchTimer->channelID,true,true); msprintf(&buffer, "%s\t%d\t%s\t%s\t%d\'\t%s~%s", switchTimer->mode==1?"":">", channel?channel->Number():-1, datebuf, TIMESTRING(startTime), switchTimer->switchMinsBefore, event->Title()?event->Title():"", event->ShortText()?event->ShortText():""); SetText(buffer, false); |