def __init__(self, session, *args): Screen.__init__(self, session) self.skinName = ["EPGSearch", "EPGSelection"] self.searchargs = args self.currSearch = "" # XXX: we lose sort begin/end here self["key_yellow"] = Button(_("New Search")) self["key_blue"] = Button(_("History")) # begin stripped copy of EPGSelection.__init__ self.bouquetChangeCB = None self.serviceChangeCB = None self.ask_time = -1 #now self["key_red"] = Button("") self.closeRecursive = False self.saved_title = None self["Service"] = ServiceEvent() self["Event"] = Event() self.type = EPG_TYPE_SINGLE self.currentService = None self.zapFunc = None self.sort_type = 0 self["key_green"] = Button(_("Add timer")) self.key_green_choice = self.ADD_TIMER self.key_red_choice = self.EMPTY self["list"] = EPGSearchList(type=self.type, selChangedCB=self.onSelectionChanged, timer=session.nav.RecordTimer) self["actions"] = ActionMap( ["EPGSelectActions", "OkCancelActions", "MenuActions"], { "menu": self.menu, "cancel": self.closeScreen, "ok": self.eventSelected, "timerAdd": self.timerAdd, "yellow": self.yellowButtonPressed, "blue": self.blueButtonPressed, "info": self.infoKeyPressed, "red": self.zapTo, # needed --> Partnerbox "nextBouquet": self.nextBouquet, # just used in multi epg yet "prevBouquet": self.prevBouquet, # just used in multi epg yet "nextService": self.nextService, # just used in single epg yet "prevService": self.prevService, # just used in single epg yet }) self["actions"].csel = self self.onLayoutFinish.append(self.onCreate) # end stripped copy of EPGSelection.__init__ # Partnerbox if PartnerBoxIconsEnabled: EPGSelection.PartnerboxInit(self, False)
def __init__(self, session, *args, **kwargs): Screen.__init__(self, session) if not isinstance(self.skinName, list): self.skinName = [self.skinName] self.skinName.append("EPGSelection") if isinstance(self, HelpableScreen): HelpableScreen.__init__(self) self.searchargs = args self.currSearch = "" self.longbuttonpressed = False # XXX: we lose sort begin/end here self["key_yellow"] = Button(_("New Search")) self["key_blue"] = Button(_("Add AutoTimer")) # begin stripped copy of EPGSelection.__init__ self.ChoiceBoxDialog = None self.bouquetChangeCB = None self.serviceChangeCB = None self.ask_time = -1 # now self.closeRecursive = False self.saved_title = None self.lastAsk = None self["Service"] = ServiceEvent() self["Event"] = Event() self["number"] = Label() self["number"].hide() self.type = EPG_TYPE_SINGLE self.currentService = None self.zapFunc = None self.currch = None self.sort_type = 0 self.eventviewDialog = None self["key_red"] = Button(_("IMDb Search")) self["key_green"] = Button(_("Add Timer")) self.key_green_choice = self.ADD_TIMER self.key_red_choice = self.EMPTY self["list"] = EPGSearchList(type=self.type, selChangedCB=self.onSelectionChanged, timer=session.nav.RecordTimer) self["dialogactions"] = HelpableActionMap(self, "WizardActions", { "back": (self.closeChoiceBoxDialog, _("Close dialog")), }, -1) self["dialogactions"].csel = self self["dialogactions"].setEnabled(False) self["okactions"] = HelpableActionMap( self, "OkCancelActions", { "cancel": (self.closeScreen, _("Exit EPG Search")), "OK": (self.epgsearchOK, _("Zap to channel")), "OKLong": (self.epgsearchOKLong, _("Show detailed event information")) }, -1) self["okactions"].csel = self self["colouractions"] = HelpableActionMap( self, "ColorActions", { "red": (self.redButtonPressed, _("IMDB search for highlighted event")), "green": (self.timerAdd, _("Add/remove/edit timer for highlighted event")), "yellow": (self.yellowButtonPressed, _("Enter new search")), "yellowlong": (self.showHistory, _("Show search history")), "blue": (self.exportAutoTimer, _("Add an AutoTimer for highlighted event")), "bluelong": (self.blueButtonPressedLong, _("Show AutoTimer list")) }, -1) self["colouractions"].csel = self self["recordingactions"] = HelpableActionMap( self, "InfobarInstantRecord", { "ShortRecord": (self.doRecordTimer, _("Add a record timer for highlighted event")), "LongRecord": (self.doZapTimer, _("Add a zap timer for highlighted event")) }, -1) self["recordingactions"].csel = self self["epgactions"] = HelpableActionMap( self, "EPGSelectActions", { "nextBouquet": (self.nextPage, _("Move down a page")), "prevBouquet": (self.prevPage, _("Move up a page")), "nextService": (self.prevPage, _("Move up a page")), "prevService": (self.nextPage, _("Move down a page")), "epg": (self.Info, _("Show detailed event information")), "info": (self.Info, _("Show detailed event information")), "infolong": (self.infoKeyPressed, _("Show detailed event information")), "menu": (self.menu, _("Setup menu")) }, -1) self["epgactions"].csel = self self["epgcursoractions"] = HelpableActionMap( self, "DirectionActions", { "left": (self.prevPage, _("Move up a page")), "right": (self.nextPage, _("Move down a page")), "up": (self.moveUp, _("Move up")), "down": (self.moveDown, _("Move down")) }, -1) self["epgcursoractions"].csel = self self.openHistory = kwargs.get("openHistory", False) self.onLayoutFinish.append(self.onCreate) # end stripped copy of EPGSelection.__init__ # Partnerbox if PartnerBoxIconsEnabled: EPGSelection.PartnerboxInit(self, False) self.refreshTimer = eTimer() self.refreshTimer.callback.append(self.refreshlist) self.startTimer = eTimer() self.startTimer.callback.append(self.startUp) self.startTimer.start(10, 1) self.searchStartTimer = eTimer() # Hook up actions for yttrailer if installed try: from Plugins.Extensions.YTTrailer.plugin import baseEPGSelection__init__ except ImportError as ie: pass else: if baseEPGSelection__init__ is not None: self["trailerActions"] = ActionMap( ["InfobarActions", "InfobarTeletextActions"], { "showTv": self.showTrailer, "showRadio": self.showTrailerList, "startTeletext": self.showConfig })
def __init__(self, session, *args): Screen.__init__(self, session) self.skinName = ["EPGSearch", "EPGSelection"] self.searchargs = args self.currSearch = "" self.longbuttonpressed = False # XXX: we lose sort begin/end here self["key_yellow"] = Button(_("New Search")) self["key_blue"] = Button(_("Add AutoTimer")) # begin stripped copy of EPGSelection.__init__ self.ChoiceBoxDialog = None self.bouquetChangeCB = None self.serviceChangeCB = None self.ask_time = -1 #now self.closeRecursive = False self.saved_title = None self["Service"] = ServiceEvent() self["Event"] = Event() self["number"] = Label() self["number"].hide() self.type = EPG_TYPE_SINGLE self.currentService = None self.zapFunc = None self.currch = None self.sort_type = 0 self.eventviewDialog = None self["key_red"] = Button(_("IMDb Search")) self["key_green"] = Button(_("Add timer")) self.key_green_choice = self.ADD_TIMER self.key_red_choice = self.EMPTY self["list"] = EPGSearchList(type=self.type, selChangedCB=self.onSelectionChanged, timer=session.nav.RecordTimer) self['dialogactions'] = HelpableActionMap(self, 'WizardActions', { 'back': (self.closeChoiceBoxDialog, _('Close dialog')), }, -1) self['dialogactions'].csel = self self["dialogactions"].setEnabled(False) self['okactions'] = HelpableActionMap( self, 'OkCancelActions', { 'cancel': (self.closeScreen, _('Exit EPG')), 'OK': (self.epgsearchOK, _('Zap to channel (setup in menu)')), 'OKLong': (self.epgsearchOKLong, _('Zap to channel and close (setup in menu)')) }, -1) self['okactions'].csel = self self['colouractions'] = HelpableActionMap( self, 'ColorActions', { 'red': (self.redButtonPressed, _('IMDB search for current event')), 'green': (self.timerAdd, _('Add/Remove timer for current event')), 'yellow': (self.yellowButtonPressed, _('Search for similar events')), 'blue': (self.exportAutoTimer, _('Add a auto timer for current event')), 'bluelong': (self.bluelongButtonPressed, _('Show AutoTimer List')) }, -1) self['colouractions'].csel = self self['recordingactions'] = HelpableActionMap( self, 'InfobarInstantRecord', { 'ShortRecord': (self.doRecordTimer, _('Add a record timer for current event')), 'LongRecord': (self.doZapTimer, _('Add a zap timer for current event')) }, -1) self['recordingactions'].csel = self self['epgactions'] = HelpableActionMap( self, 'EPGSelectActions', { 'nextBouquet': (self.nextBouquet, _('Goto next bouquet')), 'prevBouquet': (self.prevBouquet, _('Goto previous bouquet')), 'nextService': (self.nextService, _('Move down a page')), 'prevService': (self.prevService, _('Move up a page')), 'epg': (self.Info, _('Show detailed event info')), 'info': (self.Info, _('Show detailed event info')), 'infolong': (self.infoKeyPressed, _('Show single epg for current channel')), 'menu': (self.menu, _('Setup menu')) }, -1) self['epgactions'].csel = self self['epgcursoractions'] = HelpableActionMap( self, 'DirectionActions', { 'left': (self.prevPage, _('Move up a page')), 'right': (self.nextPage, _('Move down a page')), 'up': (self.moveUp, _('Goto previous channel')), 'down': (self.moveDown, _('Goto next channel')) }, -1) self['epgcursoractions'].csel = self self.onLayoutFinish.append(self.onCreate) # end stripped copy of EPGSelection.__init__ # Partnerbox if PartnerBoxIconsEnabled: EPGSelection.PartnerboxInit(self, False) self.refreshTimer = eTimer() self.refreshTimer.timeout.get().append(self.refreshlist) # Hook up actions for yttrailer if installed try: from Plugins.Extensions.YTTrailer.plugin import baseEPGSelection__init__ except ImportError as ie: pass else: if baseEPGSelection__init__ is not None: self["trailerActions"] = ActionMap( ["InfobarActions", "InfobarTeletextActions"], { "showTv": self.showTrailer, "showRadio": self.showTrailerList, "startTeletext": self.showConfig })
def __init__(self, session, *args): Screen.__init__(self, session) self.skinName = ["EPGSearch", "EPGSelection"] self.searchargs = args self.currSearch = "" # XXX: we lose sort begin/end here self["key_yellow"] = Button(_("New Search")) self["key_blue"] = Button(_("History")) # begin stripped copy of EPGSelection.__init__ self.bouquetChangeCB = None self.serviceChangeCB = None self.ask_time = -1 #now self["key_red"] = Button("") self.closeRecursive = False self.saved_title = None self["Service"] = ServiceEvent() self["Event"] = Event() self.type = EPG_TYPE_SINGLE self.currentService=None self.zapFunc = None self.sort_type = 0 self["key_green"] = Button(_("Add timer")) self.key_green_choice = self.ADD_TIMER self.key_red_choice = self.EMPTY self["list"] = EPGSearchList(type = self.type, selChangedCB = self.onSelectionChanged, timer = session.nav.RecordTimer) self["actions"] = ActionMap(["EPGSelectActions", "OkCancelActions", "MenuActions"], { "menu": self.menu, "cancel": self.closeScreen, "ok": self.eventSelected, "timerAdd": self.timerAdd, "yellow": self.yellowButtonPressed, "blue": self.blueButtonPressed, "info": self.infoKeyPressed, "red": self.zapToselect, # needed --> Partnerbox "nextBouquet": self.nextBouquet, # just used in multi epg yet "prevBouquet": self.prevBouquet, # just used in multi epg yet "nextService": self.nextService, # just used in single epg yet "prevService": self.prevService, # just used in single epg yet }) self["actions"].csel = self self.onLayoutFinish.append(self.onCreate) # end stripped copy of EPGSelection.__init__ self.select = False self.do_filter = None self.eventid = None self.isTMBD = fileExists("/usr/lib/enigma2/python/Plugins/Extensions/TMBD/plugin.pyo") # Partnerbox if PartnerBoxIconsEnabled: EPGSelection.PartnerboxInit(self, False) if self.isTMBD: self["key_red"].setText(_("Choice list")) self.select = True else: if self.isTMBD: self["key_red"].setText(_("Lookup in TMBD")) # Hook up actions for yttrailer if installed try: from Plugins.Extensions.YTTrailer.plugin import baseEPGSelection__init__ except ImportError as ie: pass else: if baseEPGSelection__init__ is not None: self["trailerActions"] = ActionMap(["InfobarActions", "InfobarTeletextActions"], { "showTv": self.showTrailer, "showRadio": self.showTrailerList, "startTeletext": self.showConfig })
def __init__(self, session, *args): Screen.__init__(self, session) self.skinName = ["EPGSearch", "EPGSelection"] self.searchargs = args self.currSearch = "" self.longbuttonpressed = False # XXX: we lose sort begin/end here self["key_yellow"] = Button(_("New Search")) self["key_blue"] = Button(_("Add AutoTimer")) # begin stripped copy of EPGSelection.__init__ self.bouquetChangeCB = None self.serviceChangeCB = None self.ask_time = -1 #now self.closeRecursive = False self.saved_title = None self["Service"] = ServiceEvent() self["Event"] = Event() self.type = EPG_TYPE_SINGLE self.currentService = None self.zapFunc = None self.sort_type = 0 self["key_red"] = Button(_("IMDb Search")) self["key_green"] = Button(_("Add timer")) self.key_green_choice = self.ADD_TIMER self.key_red_choice = self.EMPTY self["list"] = EPGSearchList(type=self.type, selChangedCB=self.onSelectionChanged, timer=session.nav.RecordTimer) self["actions"] = ActionMap( [ "EPGSelectActions", "OkCancelActions", "MenuActions", 'ColorActions', 'InfobarInstantRecord' ], { "menu": self.menu, "cancel": self.closeScreen, "OK": self.epgsearchOK, "OKLong": self.epgsearchOKLong, "epg": self.Info, "info": self.Info, "timerAdd": self.timerAdd, "yellow": self.yellowButtonPressed, "yellowlong": self.showHistory, "blue": self.exportAutoTimer, "info": self.infoKeyPressed, "red": self.redButtonPressed, "nextBouquet": self.nextBouquet, # just used in multi epg yet "prevBouquet": self.prevBouquet, # just used in multi epg yet "nextService": self.nextService, # just used in single epg yet "prevService": self.prevService, # just used in single epg yet "ShortRecord": self.doRecordTimer, "LongRecord": self.doZapTimer, }) self["actions"].csel = self self.onLayoutFinish.append(self.onCreate) # end stripped copy of EPGSelection.__init__ # Partnerbox if PartnerBoxIconsEnabled: EPGSelection.PartnerboxInit(self, False) self.refreshTimer = eTimer() self.refreshTimer.timeout.get().append(self.refreshData) # Hook up actions for yttrailer if installed try: from Plugins.Extensions.YTTrailer.plugin import baseEPGSelection__init__ except ImportError as ie: pass else: if baseEPGSelection__init__ is not None: self["trailerActions"] = ActionMap( ["InfobarActions", "InfobarTeletextActions"], { "showTv": self.showTrailer, "showRadio": self.showTrailerList, "startTeletext": self.showConfig })
def __init__(self, session, *args): Screen.__init__(self, session) self.skinName = ["EPGSearch", "EPGSelection"] self.searchargs = args self.currSearch = "" # XXX: we lose sort begin/end here self["key_yellow"] = Button(_("New Search")) self["key_blue"] = Button(_("History")) # begin stripped copy of EPGSelection.__init__ self.bouquetChangeCB = None self.serviceChangeCB = None self.ask_time = -1 #now self["key_red"] = Button("") self.closeRecursive = False self.saved_title = None self["Service"] = ServiceEvent() self["Event"] = Event() self.type = EPG_TYPE_SINGLE self.currentService = None self.zapFunc = None self.sort_type = 0 self["key_green"] = Button(_("Add timer")) self.key_green_choice = self.ADD_TIMER self.key_red_choice = self.EMPTY self["list"] = EPGSearchList(type=self.type, selChangedCB=self.onSelectionChanged, timer=session.nav.RecordTimer) self["actions"] = ActionMap( [ "EPGSelectActions", "OkCancelActions", "MenuActions", "InputActions", "InfobarAudioSelectionActions" ], { "menu": self.menu, "cancel": self.closeScreen, "ok": self.eventSelected, "timerAdd": self.timerAdd, "yellow": self.yellowButtonPressed, "blue": self.blueButtonPressed, "info": self.infoKeyPressed, "red": self.zapTo, # needed --> Partnerbox "nextBouquet": self.nextBouquet, # just used in multi epg yet "prevBouquet": self.prevBouquet, # just used in multi epg yet "nextService": self.nextService, # just used in single epg yet "prevService": self.prevService, # just used in single epg yet "1": self.importFromTimer, "2": self.importFromEPG, "3": self.importFromAutoTimer, "4": self.addAutoTimer, "5": self.exportAutoTimer, "6": self.openSPInfoScreen, "7": self.openImdb, "8": self.openTMDb, "9": self.openTMDbSerie, "0": self.setup, "audioSelection": self.searchNoNumber, }) self["actions"].csel = self self["list"].mostSearchService = "" self.onLayoutFinish.append(self.onCreate) # end stripped copy of EPGSelection.__init__ # Partnerbox if PartnerBoxIconsEnabled: EPGSelection.PartnerboxInit(self, False) # Hook up actions for yttrailer if installed try: from Plugins.Extensions.YTTrailer.plugin import baseEPGSelection__init__ except ImportError as ie: pass else: if baseEPGSelection__init__ is not None: self["trailerActions"] = ActionMap( ["InfobarActions", "InfobarTeletextActions"], { "showTv": self.showTrailer, "showRadio": self.showTrailerList, "startTeletext": self.showConfig })
def __init__(self, session, *args, **kwargs): Screen.__init__(self, session) self.skinName = ["EPGSearch", "EPGSelection"] self.searchargs = args self.searchkwargs = kwargs self.currSearch = "" self.currSearchSave = False self.currSearchDescription = False # XXX: we lose sort begin/end here self["key_yellow"] = Button(_("New Search")) self["key_blue"] = Button(self.getBlueButtonText()) # begin stripped copy of EPGSelection.__init__ self.bouquetChangeCB = None self.serviceChangeCB = None self.ask_time = -1 #now self["key_red"] = Button("") self.closeRecursive = False self.saved_title = None self["Service"] = ServiceEvent() self["Event"] = Event() self.type = EPG_TYPE_SINGLE self.currentService = None self.zapFunc = None self.sort_type = 0 self["key_green"] = Button(_("Add timer")) self.key_green_choice = self.ADD_TIMER self.key_red_choice = self.EMPTY self["list"] = EPGSearchList(type=self.type, selChangedCB=self.onSelectionChanged, timer=session.nav.RecordTimer) self["actions"] = ActionMap( [ "EPGSelectActions", "OkCancelActions", "MenuActions", "InputActions", "InfobarAudioSelectionActions" ], { "menu": self.menu, "cancel": self.closeScreen, "ok": self.eventSelected, "timerAdd": self.timerAdd, "yellow": self.yellowButtonPressed, "blue": self.blueButtonPressed, "info": self.infoKeyPressed, "red": self.zapTo, # needed --> Partnerbox "nextBouquet": self.nextBouquet, # just used in multi epg yet "prevBouquet": self.prevBouquet, # just used in multi epg yet "nextService": self.nextService, # just used in single epg yet "prevService": self.prevService, # just used in single epg yet "1": self.importFromTimer, "2": self.importFromEPG, "3": self.importFromAutoTimer, "4": self.addAutoTimer, "5": self.exportAutoTimer, "6": self.openSPInfoScreen, "7": self.openImdb, "8": self.openTMDb, "9": self.openTMDbSerie, "0": self.setup, "audioSelection": self.searchNoNumber, }) if autoTimerAvailable: self["EPGSeachFilterActions"] = ActionMap( ["WizardActions"], { "video": self.openSearchFilterList, }) self["actions"].csel = self self["list"].mostSearchService = "" self.onLayoutFinish.append(self.onCreate) # end stripped copy of EPGSelection.__init__ # Partnerbox if PartnerBoxIconsEnabled: EPGSelection.PartnerboxInit(self, False) self.pluginList = [(p.name, p) for p in plugins.getPlugins(where=[ PluginDescriptor.WHERE_EPG_SELECTION_SINGLE_BLUE, PluginDescriptor.WHERE_CHANNEL_SELECTION_RED ])] self.was_history_start = False if self.searchkwargs and self.searchkwargs.has_key( "startWithHistory") and self.searchkwargs["startWithHistory"]: self.onShown.append(self.__onShownStartHistory)