Example #1
0
    def __init__(self,
                 session,
                 service=None,
                 zapFunc=None,
                 eventid=None,
                 bouquetChangeCB=None,
                 serviceChangeCB=None,
                 EPGtype="similar",
                 StartBouquet=None,
                 StartRef=None,
                 bouquets=None):
        if service is not None and not isinstance(service, eServiceReference):
            service = eServiceReference(service)
        if EPGtype not in ("similar", "single"):
            print(
                "[EPGSelection] Warning: EPGSelection does not support type '%s'"
                % EPGtype)
            print("               Attempting to continue in single EPG mode")
        EPGSelectionChannel.__init__(self, session, service)
        EPGServiceZap.__init__(self, zapFunc or InfoBar.instance.zapToService)

        # Rewrite the EPG actions to invoke the compatibility functions.
        helpDescription = _("EPG Commands")
        self["epgactions"] = HelpableActionMap(
            self,
            "EPGSelectActions", {
                "info": (self.Info, _("Show detailed event info")),
                "epg": (self.epgButtonPressed, _("Show detailed event info")),
                "menu": (self.createSetup, _("Setup menu"))
            },
            prio=-1,
            description=helpDescription)
        self["colouractions"] = HelpableActionMap(
            self,
            "ColorActions", {
                "red":
                (self.redButtonPressed, _("IMDB search for current event")),
                "redlong": (self.redButtonPressedLong, _("Sort EPG list")),
                "green": (self.greenButtonPressed,
                          _("Add/Remove timer for current event")),
                "greenlong":
                (self.greenButtonPressedLong, _("Show timer list")),
                "yellow":
                (self.yellowButtonPressed, _("Search for similar events")),
                "blue": (self.blueButtonPressed,
                         _("Add an autotimer for current event")),
                "bluelong":
                (self.blueButtonPressedLong, _("Show autotimer list"))
            },
            prio=-1,
            description=helpDescription)
Example #2
0
 def refreshList(self):
     try:
         # Allow plugins to override using the old all lowercase method name.
         self.refreshlist()
     except AttributeError:
         EPGSelectionChannel.refreshList(self)