Esempio n. 1
0
def EPGSelection__init__(self,
                         session,
                         service,
                         zapFunc=None,
                         eventid=None,
                         bouquetChangeCB=None,
                         serviceChangeCB=None):
    baseEPGSelection__init__(self, session, service, zapFunc, eventid,
                             bouquetChangeCB, serviceChangeCB)

    def bluePressed():
        cur = self["list"].getCurrent()
        if cur[0] is not None:
            name = cur[0].getEventName()
        else:
            name = ''
        self.session.open(EPGSearch, name)

    self["epgsearch_epgselection"] = ActionMap(
        ["InfobarAudioSelectionActions"], {
            "audioSelection": bluePressed,
        })

    if self.type != EPG_TYPE_MULTI and config.plugins.epgsearch.add_search_to_epg.value:
        self["epgsearch_actions"] = ActionMap(["EPGSelectActions"], {
            "blue": bluePressed,
        })
        self["key_blue"].text = _("Search")
Esempio n. 2
0
def EPGSelection__init__(
    self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None
):
    baseEPGSelection__init__(self, session, service, zapFunc, eventid, bouquetChangeCB, serviceChangeCB)
    if self.type != EPG_TYPE_MULTI and config.plugins.epgsearch.add_search_to_epg.value:

        def bluePressed():
            cur = self["list"].getCurrent()
            if cur[0] is not None:
                name = cur[0].getEventName()
            else:
                name = ""
            self.session.open(EPGSearch, name, False)

        self["epgsearch_actions"] = ActionMap(["EPGSelectActions"], {"blue": bluePressed})
        self["key_blue"].text = _("Search")