diff options
Diffstat (limited to 'pages/ibox.ecpp')
-rw-r--r-- | pages/ibox.ecpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pages/ibox.ecpp b/pages/ibox.ecpp index 84c9615..5e714b0 100644 --- a/pages/ibox.ecpp +++ b/pages/ibox.ecpp @@ -50,7 +50,12 @@ TimerConflictNotifier timerNotifier(); if (NowReplaying) { RecordingsManagerPtr recManager = LiveRecordingsManager(); +#if VDRVERSNUM >= 20301 + LOCK_RECORDINGS_READ; + cRecording *recording = (cRecording *)Recordings->GetByName(NowReplaying); +#else cRecording *recording = Recordings.GetByName(NowReplaying); +#endif if (recording) { epgEvent = EpgEvents::CreateEpgInfo(recManager->Md5Hash(recording), recording, @@ -59,22 +64,40 @@ TimerConflictNotifier timerNotifier(); } else { string CHANNEL_STR("channel"); +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; +#else ReadLock channelsLock( Channels ); +#endif if (cDevice::CurrentChannel()) { const int SKIP_GAP = 1; +#if VDRVERSNUM >= 20301 + cChannel* Channel = (cChannel *)Channels->GetByNumber(cDevice::CurrentChannel()); + + cChannel* tmp = (cChannel *)Channels->GetByNumber(Channels->GetPrevNormal(cDevice::CurrentChannel()), -SKIP_GAP); +#else cChannel* Channel = Channels.GetByNumber(cDevice::CurrentChannel()); cChannel* tmp = Channels.GetByNumber(Channels.GetPrevNormal(cDevice::CurrentChannel()), -SKIP_GAP); +#endif if (tmp) prev_chan = tmp->GetChannelID(); +#if VDRVERSNUM >= 20301 + tmp = (cChannel *)Channels->GetByNumber(Channels->GetNextNormal(cDevice::CurrentChannel()), SKIP_GAP); +#else tmp = Channels.GetByNumber(Channels.GetNextNormal(cDevice::CurrentChannel()), SKIP_GAP); +#endif if (tmp) next_chan = tmp->GetChannelID(); const string chanName(Channel->Name()); +#if VDRVERSNUM >= 20301 + LOCK_SCHEDULES_READ; +#else cSchedulesLock schedulesLock; const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); +#endif const cSchedule *Schedule = Schedules->GetSchedule(Channel); if (Schedule) { |