ShowVonLCD: More finetuning
authorlittlesat <littlesat99@yahoo.com>
Thu, 7 Jan 2016 10:10:52 +0000 (11:10 +0100)
committerlittlesat <littlesat99@yahoo.com>
Thu, 7 Jan 2016 10:10:52 +0000 (11:10 +0100)
In some cases we could get a GSOD I did not previously see before and in
addition do change the proc or show the dummy screen when it is not
required

lib/python/Components/Lcd.py

index a42b3a8..32bb7e1 100644 (file)
@@ -117,14 +117,17 @@ def setLCDLiveTv(value):
                open(SystemInfo["LcdLiveTV"], "w").write(value and "enable" or "disable")
        else:
                open(SystemInfo["LcdLiveTV"], "w").write(value and "0" or "1")
-       InfoBarInstance = InfoBar.instance
-       InfoBarInstance and InfoBarInstance.session.open(dummyScreen)
+       if not value:
+               InfoBarInstance = InfoBar.instance
+               InfoBarInstance and InfoBarInstance.session.open(dummyScreen)
 
 def leaveStandbyLCDLiveTV():
-       setLCDLiveTv(config.lcd.showTv.value)
+       if config.lcd.showTv.value:
+               setLCDLiveTv(True)
 
 def standbyCounterChangedLCDLiveTV(dummy):
-       from Screens.Standby import inStandby
-       if leaveStandbyLCDLiveTV not in inStandby.onClose:
-               inStandby.onClose.append(leaveStandbyLCDLiveTV)
-       setLCDLiveTv(False)
+       if config.lcd.showTv.value:
+               from Screens.Standby import inStandby
+               if leaveStandbyLCDLiveTV not in inStandby.onClose:
+                       inStandby.onClose.append(leaveStandbyLCDLiveTV)
+               setLCDLiveTv(False)