diff options
author | kamel5 <kamel5 (at) gmx (dot) net> | 2018-03-08 13:02:38 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-01-27 11:29:38 +0100 |
commit | cbc6f442648a0aea4b94d81176f044c642a7d2b0 (patch) | |
tree | 3bfdc0baebcbaec7845edcc521b4041e6a25035c /detailview.c | |
parent | 8287bb5f7deef757f38b3e2a4ed5a08a57881f7e (diff) | |
download | vdr-plugin-tvguide-cbc6f442648a0aea4b94d81176f044c642a7d2b0.tar.gz vdr-plugin-tvguide-cbc6f442648a0aea4b94d81176f044c642a7d2b0.tar.bz2 |
Compile under VDR 2.3.1
Diffstat (limited to 'detailview.c')
-rw-r--r-- | detailview.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/detailview.c b/detailview.c index ca351ab..12accc3 100644 --- a/detailview.c +++ b/detailview.c @@ -9,7 +9,12 @@ cDetailView::~cDetailView(void){ Cancel(-1); while (Active()) cCondWait::SleepMs(10); +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + LOCK_CHANNELS_READ; + footer->LeaveDetailedViewMode(Channels->GetByChannelID(event->ChannelID())); +#else footer->LeaveDetailedViewMode(Channels.GetByChannelID(event->ChannelID())); +#endif if (view) delete view; } @@ -42,7 +47,12 @@ void cDetailView::InitiateView(void) { dateTime = cString::sprintf("%s %s - %s (%d %s)", *event->GetDateString(), *event->GetTimeString(), *event->GetEndTimeString(), event->Duration()/60, tr("min")); } view->SetDateTime(*dateTime); +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + LOCK_CHANNELS_READ; + view->SetChannel(Channels->GetByChannelID(event->ChannelID(), true)); +#else view->SetChannel(Channels.GetByChannelID(event->ChannelID(), true)); +#endif view->SetEventID(event->EventID()); view->SetEvent(event); } @@ -90,7 +100,12 @@ std::string cDetailView::LoadReruns(void) { continue; i++; sstrReruns << *DayDateTime(r->event->StartTime()); +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByChannelID(r->event->ChannelID(), true, true); +#else cChannel *channel = Channels.GetByChannelID(r->event->ChannelID(), true, true); +#endif if (channel) { sstrReruns << ", " << trVDR("Channel") << " " << channel->Number() << ":"; sstrReruns << " " << channel->ShortName(true); |