Ejemplo n.º 1
0
	def onCreate(self):
		try:
			EPGSelection.onCreate(self)
			if self.event_id is not None:
				self["list"].moveToEventId(self.event_id)
		except:
			pass
Ejemplo n.º 2
0
	def onSelectionChanged(self):
		self["Service"].newService(eServiceReference(str(self["list"].getCurrent()[1])))
		self["Event"].newEvent(self["list"].getCurrent()[0])
		EPGSelection.onSelectionChanged(self)
		if PartnerBoxZapRepIcons:
			if self.isTMBD:
				self["key_red"].setText(_("Choice list"))
Ejemplo n.º 3
0
 def timerAdd(self):
     proceed = False
     if self.key_green_choice == self.REMOVE_TIMER or self.currSearchATList is None:
         EPGSelection.timerAdd(self)
     else:
         cur = self["list"].getCurrent()
         evt = cur[0]
         serviceref = cur[1]
         event = parseEvent(evt)
         for item in self.currSearchATList:
             if item[1] == evt.getEventId():
                 if item[4] != evt.getEventName():
                     #add org searchTitle from search filter to event (perhaps changed by SeriesPlugin)
                     event_lst = list(event)
                     event_lst[2] = item[4]
                     event = tuple(event_lst)
                     proceed = True
                 break
         if proceed:
             newEntry = RecordTimerEntry(serviceref,
                                         checkOldTimers=True,
                                         dirname=preferredTimerPath(),
                                         *event)
             self.session.openWithCallback(self.finishedAdd, TimerEntry,
                                           newEntry)
         else:
             EPGSelection.timerAdd(self)
Ejemplo n.º 4
0
 def __init__(self, session, ref, openPlugin, eventid=None):
     EPGSelection.__init__(self, session, ref.toString(), eventid=eventid)
     if not isinstance(self.skinName, list):
         self.skinName = [self.skinName]
     self.skinName.append("EPGSelection")
     self["key_green"].text = _("Search")
     self.openPlugin = openPlugin
Ejemplo n.º 5
0
	def onSelectionChanged(self):
		self["Service"].newService(eServiceReference(str(self["list"].getCurrent()[1])))
		self["Event"].newEvent(self["list"].getCurrent()[0])
		EPGSelection.onSelectionChanged(self)
		if PartnerBoxZapRepIcons:
			if self.isTMBD:
				self["key_red"].setText(_("Choice list"))
Ejemplo n.º 6
0
	def onCreate(self):
		try:
			EPGSelection.onCreate(self)
			if self.event_id is not None:
				self["list"].moveToEventId(self.event_id)
		except:
			pass
Ejemplo n.º 7
0
 def searchEPGAskCallback(self, searchString, ret):
     if ret:
         if ret[1] == "setup":
             self.lastAsk = None
             self.setup()
         else:
             self.lastAsk = ret[1]
             self.startSearchEPG(searchString, ret[1])
     else:
         if self.firstSearch:
             # Don't save abandoned initial search,
             # so don't use closeScreen()
             EPGSelection.close(self)
Ejemplo n.º 8
0
	def searchEPGAskCallback(self, searchString, ret):
		if ret:
			if ret[1] == "setup":
				self.lastAsk = None
				self.setup()
			else:
				self.lastAsk = ret[1]
				self.startSearchEPG(searchString, ret[1])
		else:
			if self.firstSearch:
				# Don't save abandoned initial search,
				# so don't use closeScreen()
				EPGSelection.close(self)
Ejemplo n.º 9
0
    def onCreate(self):
        self.setTitle(_("EPG Search"))
        self.currSearchATList = None

        if self.searchkwargs and self.searchkwargs.has_key("AT"):
            #show matches from SearchFilter
            l = self["list"]
            l.recalcEntrySize()
            resultlist = self.searchkwargs["AT"]
            self.currSearchATList = resultlist[:]
            if config.plugins.epgsearch.show_shortdesc.value and len(
                    resultlist):
                epgcache = eEPGCache.getInstance()
                resultlist = self.addShortDescription(epgcache, resultlist)
            l.list = resultlist
            l.l.setList(resultlist)
        elif self.searchargs:
            self.doSearchEPG(*self.searchargs)
        else:
            l = self["list"]
            l.recalcEntrySize()
            l.list = []
            l.l.setList(l.list)
        del self.searchargs
        del self.searchkwargs

        # Partnerbox
        if PartnerBoxIconsEnabled:
            EPGSelection.GetPartnerboxTimerlist(self)
Ejemplo n.º 10
0
	def __init__(self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None):
		Screen.__init__(self, session)
		EPGSelection.__init__(self, session, service, zapFunc, eventid, bouquetChangeCB, serviceChangeCB)
		EPGSelection.skinName = "NewEasyPG"
		self.skinName = "NewEasyPG"
		
		global EINposition
		EINposition = 0
		allbouq = InfoBar_instance.servicelist.getBouquetList()
		for newpos in range(0, len(allbouq)):
			if InfoBar_instance.servicelist.getRoot() == allbouq[newpos][1]:
				EINposition = newpos
				break
		
		self.initPrimeTime = False
		self.session = session

		self.primeTimeHour = config.plugins.EasyInfo.primeTime2.value[0]
		self.primeTimeMinute = config.plugins.EasyInfo.primeTime2.value[1]
		
		self["list"] = EasyInfoEventList(type = EPG_TYPE_MULTI, selChangedCB = self.onSelectionChanged, timer = session.nav.RecordTimer)

		self.refreshTimer = eTimer()
		self.refreshTimer_conn = self.refreshTimer.timeout.connect(self.refreshEPG)
		
		self["actions"] = ActionMap(["EPGSelectActions", "OkCancelActions", "NumberActions", "InfobarActions"],
			{
				"cancel": self.closeScreen,
				"ok": self.okPressed,
				"timerAdd": self.timerAdd,
				"yellow": self.yellowButtonPressed,
				"blue": self.blueButtonPressed,
				"info": self.infoKeyPressed,
				"red": self.redButtonPressed,
				"input_date_time": self.openContextMenu,
				"nextBouquet": self.nextBouquet,
				"prevBouquet": self.prevBouquet,
				"nextService": self.goToPrimeTimeNextDay,
				"prevService": self.goToPrimeTimePreviousDay,
				"showMovies": self.enterDateTime,
				"showTv": self.zapTo,
				"showRadio": self.zapAndRefresh,
				"0": self.goToCurrentTime,
				"1": self.setPrimeTime1,
				"2": self.setPrimeTime2,
				"3": self.setPrimeTime3
			},-1)
Ejemplo n.º 11
0
    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)
Ejemplo n.º 12
0
	def __init__(self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None):
		Screen.__init__(self, session)
		EPGSelection.__init__(self, session, service, zapFunc, eventid, bouquetChangeCB, serviceChangeCB)
		EPGSelection.skinName = "NewEasySelection"
		self.skinName = "NewEasySelection"
		
		global EINposition
		EINposition = 0
		bouquets = InfoBar_instance.servicelist.getBouquetList()
		for pos in range(0, len(bouquets)):
			if InfoBar_instance.servicelist.getRoot() == bouquets[pos][1]:
				EINposition = pos
				break
		
		self.session = session

		self["list"] = EasyInfoEventList(type = EPG_TYPE_MULTI, selChangedCB = self.onSelectionChanged, timer = session.nav.RecordTimer)
		self["listNext"] = EasyInfoEventList(type = EPG_TYPE_MULTI, selChangedCB = self.onSelectionChanged, timer = session.nav.RecordTimer, hasChannelInfo=False)

		self["actions"] = ActionMap(["EPGSelectActions", "OkCancelActions", "DirectionActions"],
			{
				"cancel": self.closeScreen,
				"ok": self.okPressed,
				"info": self.infoKeyPressed,
				"nextBouquet": self.nextBouquet,
				"prevBouquet": self.prevBouquet,
				"right": self.rightPressed,
				"rightRepeated": self.rightPressed,
				"left": self.leftPressed,
				"leftRepeated": self.leftPressed,
				"up": self.upPressed,
				"upRepeated": self.upPressed,
				"down": self.downPressed,
				"downRepeated": self.downPressed,
				"nextService": self.setModePrimeTime,
				"prevService": self.setModeNowNext,
			},-1)
		
		self.onLayoutFinish.append(self.layoutFinished)
Ejemplo n.º 13
0
	def __init__(self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None):
		Screen.__init__(self, session)
		EPGSelection.__init__(self, session, service, zapFunc, eventid, bouquetChangeCB, serviceChangeCB)
		global EINposition
		EINposition = 0
		self.PTinit = False
		self.session = session
		EPGSelection.skinName = "EasyPG"
		self.PThour = config.plugins.EasyInfo.Primetime2.value[0]
		self.PTmin = config.plugins.EasyInfo.Primetime2.value[1]
		self["list"] = EvNewList(type = EPG_TYPE_MULTI, selChangedCB = self.onSelectionChanged, timer = session.nav.RecordTimer)
		self.skinName = "EasyPG"
		self.RefrTimer = eTimer()
		self.RefrTimer.callback.append(self.RefreshEPG)
		self["actions"] = ActionMap(["EPGSelectActions", "OkCancelActions", "NumberActions", "InfobarActions"],
			{
				"cancel": self.closeScreen,
				"ok": self.newOKFunc,
				"timerAdd": self.timerAdd,
				"yellow": self.yellowButtonPressed,
				"blue": self.blueButtonPressed,
				"info": self.infoKeyPressed,
				"red": self.newRedFunc,
				"input_date_time": self.einContextMenu,
				"nextBouquet": self.nextBouquet,
				"prevBouquet": self.prevBouquet,
				"nextService": self.PTfor,
				"prevService": self.PTback,
				"showMovies": self.enterDateTime,
				"showTv": self.zapTo,
				"showRadio": self.zapForRefr,
				"0": self.GoFirst,
				"1": self.SetPT1,
				"2": self.SetPT2,
				"3": self.SetPT3
			},-1)
Ejemplo n.º 14
0
    def onCreate(self):
        self.setTitle(_("EPG Search"))

        if self.searchargs:
            self.searchEPG(*self.searchargs)
        else:
            l = self["list"]
            l.recalcEntrySize()
            l.list = []
            l.l.setList(l.list)
        del self.searchargs

        # Partnerbox
        if PartnerBoxIconsEnabled:
            EPGSelection.GetPartnerboxTimerlist(self)
Ejemplo n.º 15
0
    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
                    })
Ejemplo n.º 16
0
	def __init__(self, session, ref, openPlugin):
		EPGSelection.__init__(self, session, ref)
		self.skinName = ["EPGSearchEPGSelection", "EPGSelection"]
		self["key_green"].text = _("Search")
		self.openPlugin = openPlugin
Ejemplo n.º 17
0
	def closeScreen(self):
		# Save our history
		config.plugins.epgsearch.save()
		self.searchStartTimer.stop()
		EPGSelection.close(self)
Ejemplo n.º 18
0
	def __init__(self, *args):
		EPGSelection.__init__(self, *args)
		self.skinName = "EPGSelection"
		self["key_red"].setText(_(" add AutoTimer"))
	def __init__(self, *args):
		EPGSelection.__init__(self, *args)
		self.skinName = "EPGSelection"
Ejemplo n.º 20
0
	def __init__(self, session, ref, event_id=None):
		self.event_id = event_id
		EPGSelection.__init__(self, session, ref)
		self.skinName = ["CurrentSearchSingleSelection", "EPGSelection"]
Ejemplo n.º 21
0
	def __init__(self, *args):
		try: EPGSelection.__init__(self, *args, EPGtype='single')
		except:  EPGSelection.__init__(self, *args)
		self.skinName = "EPGSelection"
Ejemplo n.º 22
0
	def __init__(self, session, ref, eventid=None, openPlugin = True):
		EPGSelection.__init__(self, session, ref.toString(), eventid=eventid)
		self.skinName = "EPGSelection"
		self["key_green"].setText(_("Lookup"))
		self.openPlugin = openPlugin
Ejemplo n.º 23
0
 def __init__(self, session, ref):
     EPGSelection.__init__(self, session, ref)
     self.skinName = "EPGSelection"
     self.key_green_choice = EPGSelection.EMPTY
     self.key_red_choice = EPGSelection.EMPTY
     self.skinName = "EPGSelection"
Ejemplo n.º 24
0
    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
                    })
Ejemplo n.º 25
0
	def __init__(self, session, ref, openPlugin, eventid=None):
		EPGSelection.__init__(self, session, ref.toString(), eventid=eventid)
		self.skinName = [self.skinName, "EPGSelection"]
		self["key_green"].text = _("Search")
		self.openPlugin = openPlugin
Ejemplo n.º 26
0
 def __init__(self, session, ref):
     EPGSelection.__init__(self, session, ref)
     self.skinName = "EPGSelection"
     self.key_green_choice = EPGSelection.EMPTY
     self.key_red_choice = EPGSelection.EMPTY
     self.skinName = "EPGSelection"
Ejemplo n.º 27
0
 def closeScreen(self):
     # Save our history
     config.plugins.epgsearch.save()
     EPGSelection.close(self)
Ejemplo n.º 28
0
	def __init__(self, session, ref, openPlugin = True):
		EPGSelection.__init__(self, session, ref)
		self.skinName = "EPGSelection"
		self["key_green"].setText(_("Lookup"))
		self.openPlugin = openPlugin
Ejemplo n.º 29
0
 def __init__(self, session, ref, openPlugin):
     EPGSelection.__init__(self, session, ref)
     self.skinName = ["EPGSearchEPGSelection", "EPGSelection"]
     self["key_green"].text = _("Search")
     self.openPlugin = openPlugin
Ejemplo n.º 30
0
    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
                    })
Ejemplo n.º 31
0
	def __init__(self, session, ref, event_id=None):
		self.event_id = event_id
		EPGSelection.__init__(self, session, ref)
		self.skinName = ["CurrentSearchSingleSelection", "EPGSelection"]
Ejemplo n.º 32
0
 def closeScreen(self):
     # Save our history
     config.plugins.epgsearch.save()
     self.searchStartTimer.stop()
     EPGSelection.close(self)
Ejemplo n.º 33
0
	def __init__(self, session, ref, openPlugin):
		EPGSelection.__init__(self, session, ref)
		self.skinName = ["EPGSearchEPGSelection", "EPGSelection"]
		self.openPlugin = openPlugin
Ejemplo n.º 34
0
 def onSelectionChanged(self):
     self["Service"].newService(
         eServiceReference(str(self["list"].getCurrent()[1])))
     self["Event"].newEvent(self["list"].getCurrent()[0])
     EPGSelection.onSelectionChanged(self)
Ejemplo n.º 35
0
	def closeScreen(self):
		# Save our history
		config.plugins.epgsearch.save()
		EPGSelection.close(self)
Ejemplo n.º 36
0
	def __init__(self, *args):
		EPGSelection.__init__(self, *args)
		self.skinName = "EPGSelection"
Ejemplo n.º 37
0
	def onSelectionChanged(self):
		self["Service"].newService(eServiceReference(str(self["list"].getCurrent()[1])))
		self["Event"].newEvent(self["list"].getCurrent()[0])
		EPGSelection.onSelectionChanged(self)
Ejemplo n.º 38
0
	def __init__(self, *args):
		EPGSelection.__init__(self, *args)
		self.skinName = "EPGSelection"
		self["key_red"].setText(_(" add AutoTimer"))
Ejemplo n.º 39
0
    def onCreate(self):
        self.setTitle(_("EPG Search"))

        # Partnerbox
        if PartnerBoxIconsEnabled:
            EPGSelection.GetPartnerboxTimerlist(self)
Ejemplo n.º 40
0
	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
				})
Ejemplo n.º 41
0
    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
                    })
Ejemplo n.º 42
0
	def __init__(self, session, ref, eventid=None, openPlugin = True):
		EPGSelection.__init__(self, session, ref.toString(), eventid=eventid)
		self.skinName = "EPGSelection"
		self["key_green"].setText(_("Lookup"))
		self.openPlugin = openPlugin
Ejemplo n.º 43
0
	def __init__(self, session, ref, openPlugin=True):
		EPGSelection.__init__(self, session, ref)
		self.skinName = "EPGSelection"
		self["key_yellow"].setText(_("Lookup IMDb"))
		self.openPlugin = openPlugin
Ejemplo n.º 44
0
	def __init__(self, session, ref, openPlugin):
		EPGSelection.__init__(self, session, ref)
		self.skinName = ["EPGSearchEPGSelection", "EPGSelection"]
		self.openPlugin = openPlugin