diff options
author | Rolf Ahrenberg <Rolf.Ahrenberg@sci.fi> | 2017-04-01 23:17:15 +0300 |
---|---|---|
committer | Rolf Ahrenberg <Rolf.Ahrenberg@sci.fi> | 2017-04-01 23:17:15 +0300 |
commit | eaa015874e3e494006d67260feaebe6377568ebb (patch) | |
tree | 9d407c10cbf0d541377a08e390ed603909abfddb /pages/remote.ecpp | |
parent | a8eb15416c38009efb9562c5d64ef87719ae017c (diff) | |
download | vdr-plugin-live-eaa015874e3e494006d67260feaebe6377568ebb.tar.gz vdr-plugin-live-eaa015874e3e494006d67260feaebe6377568ebb.tar.bz2 |
VDR-2.3.1 compatibility patch by Nachteule.
http://www.vdr-portal.de/board16-video-disk-recorder/board55-vdr-plugins/p1280013-vdr-live-vdr-2-3-1/#post1280013
Diffstat (limited to 'pages/remote.ecpp')
-rw-r--r-- | pages/remote.ecpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pages/remote.ecpp b/pages/remote.ecpp index 0f2b195..a1aa0ff 100644 --- a/pages/remote.ecpp +++ b/pages/remote.ecpp @@ -31,20 +31,36 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); pageTitle = tr("Remote Control"); +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; +#else ReadLock channelsLock( Channels ); if ( !channelsLock ) throw HtmlError( tr("Couldn't aquire access to channels, please try again later.") ); +#endif // cChannel* Channel; (see %request above) if ( channel > 0 ) { +#if VDRVERSNUM >= 20301 + Channel = (cChannel *)Channels->GetByNumber( channel ); +#else Channel = Channels.GetByNumber( channel ); +#endif } else { if (cDevice::CurrentChannel()) { +#if VDRVERSNUM >= 20301 + Channel = (cChannel *)Channels->GetByNumber(cDevice::CurrentChannel()); +#else Channel = Channels.GetByNumber(cDevice::CurrentChannel()); +#endif } else { +#if VDRVERSNUM >= 20301 + Channel = (cChannel *)Channels->Get( Channels->GetNextNormal( -1 ) ); +#else Channel = Channels.Get( Channels.GetNextNormal( -1 ) ); +#endif } } if ( Channel == 0 ) |