Skip to content

Commit

Permalink
Fix some leftoverts
Browse files Browse the repository at this point in the history
  • Loading branch information
henrylicious committed Mar 12, 2024
1 parent a43818b commit eb1a4b9
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/python/Components/AVSwitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ def setAC3Downmix(configElement):
else:
f.write(configElement.value and "downmix" or "passthrough")
f.close()
if SystemInfo.get("supportPcmMultichannel", False) and not configElement.value:
if BoxInfo.getItem("supportPcmMultichannel", False) and not configElement.value:
BoxInfo.setItem("CanPcmMultichannel", True)
else:
BoxInfo.setItem("CanPcmMultichannel", False)
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Components/Timeshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ def ptsGetEventInfo(self):
self.pts_curevent_eventid = curEvent[4]

def ptsFrontpanelActions(self, action=None):
if self.session.nav.RecordTimer.isRecording() or SystemInfo.get("NumFrontpanelLEDs", 0) == 0:
if self.session.nav.RecordTimer.isRecording() or BoxInfo.getItem("NumFrontpanelLEDs", 0) == 0:
return

if action == "start":
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Components/UsageConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,14 +1553,14 @@ def autolanguagesub(configElement):
config.epgselection.sort = ConfigSelection(default="0", choices=[("0", _("Time")), ("1", _("Alphanumeric"))])
config.epgselection.overjump = ConfigYesNo(default=False)
config.epgselection.infobar_type_mode = ConfigSelection(choices=[("graphics", _("Multi EPG")), ("single", _("Single EPG"))], default="graphics")
if SystemInfo.get("NumVideoDecoders", 1) > 1:
if BoxInfo.getItem("NumVideoDecoders", 1) > 1:
config.epgselection.infobar_preview_mode = ConfigSelection(choices=[("0", _("Disabled")), ("1", _("Fullscreen")), ("2", _("PiP"))], default="1")
else:
config.epgselection.infobar_preview_mode = ConfigSelection(choices=[("0", _("Disabled")), ("1", _("Fullscreen"))], default="1")
config.epgselection.infobar_ok = ConfigSelection(choices=[("Zap", _("Zap")), ("Zap + Exit", _("Zap + Exit"))], default="Zap")
config.epgselection.infobar_oklong = ConfigSelection(choices=[("Zap", _("Zap")), ("Zap + Exit", _("Zap + Exit"))], default="Zap + Exit")
config.epgselection.infobar_itemsperpage = ConfigSelectionNumber(default=2, stepwidth=1, min=1, max=4, wraparound=True)
if SystemInfo.get("NumVideoDecoders", 1) > 1:
if BoxInfo.getItem("NumVideoDecoders", 1) > 1:
if HardwareInfo().is_nextgen():
previewdefault = "2"
else:
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Plugins/Extensions/MenuSort/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ def addMenu(self, destList, node):
requires = node.get("requires")
if requires:
if requires[0] == '!':
if SystemInfo.get(requires[1:], False):
if BoxInfo.getItem(requires[1:], False):
return
elif not SystemInfo.get(requires, False):
elif not BoxInfo.getItem(requires, False):
return
MenuTitle = ensure_str(_(node.get("text", "??")))
entryID = node.get("entryID", "undefined")
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Plugins/Extensions/QuadPip/qpip.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,12 +954,12 @@ def updateChannelName(self, channel):
self["ch%d" % idx].setText((channel and channel.getChannelName(str(idx))) or _("No channel"))

def disableLcdLiveTV(self):
if SystemInfo.get("LcdLiveTV", False):
if BoxInfo.getItem("LcdLiveTV", False):
self.oldLcdLiveTVEnable = config.lcd.showTv.value
config.lcd.showTv.value = False

def restoreLcdLiveTV(self):
if SystemInfo.get("LcdLiveTV", False):
if BoxInfo.getItem("LcdLiveTV", False):
config.lcd.showTv.value = self.oldLcdLiveTVEnable


Expand Down
10 changes: 5 additions & 5 deletions lib/python/Plugins/Extensions/VirtualZap/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class VirtualZap(Screen):
# VirtualZap or VirtualZapNoPiP
#

if SystemInfo.get("NumVideoDecoders", 1) > 1 and config.plugins.virtualzap.usepip.value and config.plugins.virtualzap.showpipininfobar.value:
if BoxInfo.getItem("NumVideoDecoders", 1) > 1 and config.plugins.virtualzap.usepip.value and config.plugins.virtualzap.showpipininfobar.value:
# use PiP in Infobar
if sz_w == 1280:
skin = """
Expand Down Expand Up @@ -203,7 +203,7 @@ class VirtualZap(Screen):
<widget backgroundColor="#101214" font="Regular;20" halign="right" name="NextTime" position="550,80" size="120,25" transparent="1" zPosition="2"/>
</screen>"""
else:
if SystemInfo.get("NumVideoDecoders", 1) > 1 and config.plugins.virtualzap.usepip.value and not config.plugins.virtualzap.showpipininfobar.value:
if BoxInfo.getItem("NumVideoDecoders", 1) > 1 and config.plugins.virtualzap.usepip.value and not config.plugins.virtualzap.showpipininfobar.value:
# use standard PiP
config.av.pip = ConfigPosition(default=[0, 0, 0, 0], args=(719, 567, 720, 568))
x = config.av.pip.value[0]
Expand Down Expand Up @@ -256,12 +256,12 @@ class VirtualZap(Screen):
def __init__(self, session, servicelist=None):
Screen.__init__(self, session)
self.session = session
if SystemInfo.get("NumVideoDecoders", 1) > 1 and config.plugins.virtualzap.usepip.value and config.plugins.virtualzap.showpipininfobar.value:
if BoxInfo.getItem("NumVideoDecoders", 1) > 1 and config.plugins.virtualzap.usepip.value and config.plugins.virtualzap.showpipininfobar.value:
self.skinName = "VirtualZap"
self.pipAvailable = True
else:
self.skinName = "VirtualZapNoPiP"
self.pipAvailable = (SystemInfo.get("NumVideoDecoders", 1) > 1) and config.plugins.virtualzap.usepip.value and not config.plugins.virtualzap.showpipininfobar.value
self.pipAvailable = (BoxInfo.getItem("NumVideoDecoders", 1) > 1) and config.plugins.virtualzap.usepip.value and not config.plugins.virtualzap.showpipininfobar.value
self.epgcache = eEPGCache.getInstance()
self.CheckForEPG = eTimer()
self.CheckForEPG.callback.append(self.CheckItNow)
Expand Down Expand Up @@ -721,7 +721,7 @@ def __init__(self, session):
self["key_green"] = StaticText(_("OK"))
self.list = []
self.list.append(getConfigListEntry(_("Usage"), config.plugins.virtualzap.mode))
if SystemInfo.get("NumVideoDecoders", 1) > 1:
if BoxInfo.getItem("NumVideoDecoders", 1) > 1:
self.list.append(getConfigListEntry(_("Use PiP"), config.plugins.virtualzap.usepip))
self.list.append(getConfigListEntry(_("Show PiP in Infobar"), config.plugins.virtualzap.showpipininfobar))
self.list.append(getConfigListEntry(_("Start standard PiP after x secs (0 = disabled)"), config.plugins.virtualzap.exittimer))
Expand Down
8 changes: 4 additions & 4 deletions lib/python/Screens/InfoBarGenerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ def useBookmark(self):
def switchChannelUp(self):
if not self.secondInfoBarScreen or not self.secondInfoBarScreen.shown:
self.keyHide(False)
if not self.LongButtonPressed or SystemInfo.get("NumVideoDecoders", 1) <= 1:
if not self.LongButtonPressed or BoxInfo.getItem("NumVideoDecoders", 1) <= 1:
if not config.usage.show_bouquetalways.value:
if "keep" not in config.usage.servicelist_cursor_behavior.value:
self.servicelist.moveUp()
Expand All @@ -1595,7 +1595,7 @@ def switchChannelUp(self):
def switchChannelDown(self):
if not self.secondInfoBarScreen or not self.secondInfoBarScreen.shown:
self.keyHide(False)
if not self.LongButtonPressed or SystemInfo.get("NumVideoDecoders", 1) <= 1:
if not self.LongButtonPressed or BoxInfo.getItem("NumVideoDecoders", 1) <= 1:
if not config.usage.show_bouquetalways.value:
if "keep" not in config.usage.servicelist_cursor_behavior.value:
self.servicelist.moveDown()
Expand Down Expand Up @@ -1623,7 +1623,7 @@ def openSatellites(self):
self.session.execDialog(self.servicelist)

def zapDown(self):
if not self.LongButtonPressed or SystemInfo.get("NumVideoDecoders", 1) <= 1:
if not self.LongButtonPressed or BoxInfo.getItem("NumVideoDecoders", 1) <= 1:
if self.pts_blockZap_timer.isActive():
return

Expand Down Expand Up @@ -1680,7 +1680,7 @@ def zapDown(self):
self["SeekActionsPTS"].setEnabled(True)

def zapUp(self):
if not self.LongButtonPressed or SystemInfo.get("NumVideoDecoders", 1) <= 1:
if not self.LongButtonPressed or BoxInfo.getItem("NumVideoDecoders", 1) <= 1:
if self.pts_blockZap_timer.isActive():
return

Expand Down
6 changes: 3 additions & 3 deletions lib/python/Screens/SessionGlobals.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def __init__(self, session):
PATTERN_OFF = (20, 0, 0)
PATTERN_BLINK = (20, 0x55555555, 0xa7fccf7a)

have_display = SystemInfo.get("FrontpanelDisplay", False)
have_touch_sensor = SystemInfo.get("HaveTouchSensor", False)
nr_leds = SystemInfo.get("NumFrontpanelLEDs", 0)
have_display = BoxInfo.getItem("FrontpanelDisplay", False)
have_touch_sensor = BoxInfo.getItem("HaveTouchSensor", False)
nr_leds = BoxInfo.getItem("NumFrontpanelLEDs", 0)

if nr_leds == 1:
FrontpanelLed(which=0, boolean=False, patterns=[PATTERN_OFF if have_display else PATTERN_ON, PATTERN_BLINK, PATTERN_OFF, PATTERN_BLINK]).connect(combine)
Expand Down

0 comments on commit eb1a4b9

Please sign in to comment.