Skip to content

Commit

Permalink
[ChannelSelection]
Browse files Browse the repository at this point in the history
* remove forceLegacy attribute because some plugins do overwrite the init
  • Loading branch information
jbleyel committed Aug 31, 2024
1 parent 13f7efc commit 7085b71
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/python/Screens/ChannelSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def parseNextEvent(list, isZapTimer=False): # IanSav: This is only used in once


class ChannelSelectionBase(Screen):
def __init__(self, session, forceLegacy=False):
def __init__(self, session):
def digitHelp():
return _("LCN style QuickSelect entry selection") if config.usage.show_channel_jump_in_servicelist.value == "quick" else _("SMS style QuickSelect entry selection")

Expand All @@ -142,7 +142,7 @@ def rightHelp():
self["key_green"] = StaticText(_("Reception Lists"))
self["key_yellow"] = StaticText(_("Providers"))
self["key_blue"] = StaticText(_("Bouquets"))
self["list"] = ServiceListLegacy(self) if config.channelSelection.screenStyle.value == "" or config.channelSelection.widgetStyle.value == "" or forceLegacy else ServiceList(self)
self["list"] = ServiceListLegacy(self) if config.channelSelection.screenStyle.value == "" or config.channelSelection.widgetStyle.value == "" else ServiceList(self)
self.servicelist = self["list"]
self.numericalTextInput = NumericalTextInput(handleTimeout=False)
self.servicePath = []
Expand Down Expand Up @@ -2321,9 +2321,9 @@ def updateEventInfo(self):
class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelectionEPG, SelectionEventInfo):
instance = None

def __init__(self, session, forceLegacy=False):
ChannelSelectionBase.__init__(self, session, forceLegacy)
if config.channelSelection.screenStyle.value and not forceLegacy:
def __init__(self, session):
ChannelSelectionBase.__init__(self, session)
if config.channelSelection.screenStyle.value:
self.skinName = [config.channelSelection.screenStyle.value]
elif config.usage.use_pig.value:
self.skinName = ["ChannelSelection_PIG", "ChannelSelection"]
Expand Down Expand Up @@ -3017,8 +3017,10 @@ def walk(serviceHandler, bouquet, level=0):

class PiPZapSelection(ChannelSelection):
def __init__(self, session):
ChannelSelection.__init__(self, session, forceLegacy=True)
ChannelSelection.__init__(self, session)
self.skinName = ["SlimChannelSelection", "SimpleChannelSelection", "ChannelSelection"]
self["list"] = ServiceListLegacy(self) # Force legacy list
self.servicelist = self["list"]
self.startservice = None
self.pipzapfailed = None
if plugin_PiPServiceRelation_installed:
Expand Down Expand Up @@ -3106,7 +3108,9 @@ def __init__(self, session):

class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelectionEPG, InfoBarBase, SelectionEventInfo):
def __init__(self, session, infobar):
ChannelSelectionBase.__init__(self, session, forceLegacy=True)
ChannelSelectionBase.__init__(self, session)
self["list"] = ServiceListLegacy(self) # Force legacy list
self.servicelist = self["list"]
InfoBarBase.__init__(self)
SelectionEventInfo.__init__(self)
self.infobar = infobar
Expand Down Expand Up @@ -3253,6 +3257,8 @@ def zapBack(self):
class SimpleChannelSelection(ChannelSelectionBase):
def __init__(self, session, title, currentBouquet=False):
ChannelSelectionBase.__init__(self, session)
self["list"] = ServiceListLegacy(self) # Force legacy list
self.servicelist = self["list"]
self["actions"] = HelpableActionMap(self, ["OkCancelActions", "TvRadioActions"], {
"ok": (self.channelSelected, _("Play the selected service")),
"cancel": (self.close, _("Cancel the selection and exit")),
Expand Down

0 comments on commit 7085b71

Please sign in to comment.