From d1f5de137018a9634c82cd9bf5f4967a66cabb14 Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Sat, 27 Feb 2016 20:49:26 +0100 Subject: Don't save current channel when key_tv/radio is pressed if currect group is protected --- History | 2 +- javascript/main.js | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/History b/History index d31911f..cee276b 100644 --- a/History +++ b/History @@ -9,7 +9,7 @@ Marc E for the black skin. VDR 1.7.29+ 0.28 Time to display volume info can be set independant from other OSD timeout. - + Key_TV/RADIO - Don't save current channel if current group is protected. 0.27 Weather info from openweathermap.org added. You can add your own api key, see settings.js diff --git a/javascript/main.js b/javascript/main.js index 08977aa..54f40d9 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -1075,16 +1075,22 @@ function onKeyDown(event) { if(isFullscreen) { if(ChanGroup !== 9) { //Radio - defChan[ChanGroup] = currChan; - OldChanGroup = ChanGroup; - ChanGroup = 9; - currChan = defChan[9]; + defChan[ChanGroup] = currChan; + if ((protChn[ChanGroup] !== 1)) { + //If group is protected don't saving current channel + OldChanGroup = ChanGroup; + } + ChanGroup = 9; + currChan = defChan[9]; } else { - //TV - defChan[ChanGroup] = currChan; - ChanGroup = OldChanGroup; - currChan = defChan[ChanGroup]; - } + //TV + defChan[ChanGroup] = currChan; + if ((protChn[OldChanGroup] !== 1)) { + //If group is protected don't saving current channel + ChanGroup = OldChanGroup; + } + currChan = defChan[ChanGroup]; + } MenuOff(0); play(channels[currChan]); } -- cgit v1.2.3