Пример #1
0
	def __init__(self, session, zapFunc, startBouquet, startRef, bouquets, timeFocus=None):
		UserDefinedButtons.__init__(self, config.epgselection.single, epgActions, okActions)
		EPGSelectionBase.__init__(self, session, config.epgselection.single, startBouquet, startRef, bouquets)
		EPGServiceNumberSelection.__init__(self)
		EPGServiceZap.__init__(self, zapFunc)

		self.skinName = ["SingleEPG", "EPGSelection"]
		EPGServiceBrowse.__init__(self)

		helpDescription = _("EPG Commands")
		self["epgactions"] = HelpableActionMap(self, "EPGSelectActions", {
			"nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
			"prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
			"nextService": (self.nextService, _("Go to next channel")),
			"prevService": (self.prevService, _("Go to previous channel")),
			"epg": self.helpKeyAction("epg"),
			"epglong": self.helpKeyAction("epglong"),
			"info": self.helpKeyAction("info"),
			"infolong": self.helpKeyAction("infolong"),
			"tv": (self.toggleBouquetList, _("Toggle between bouquet/epg lists")),
			"timer": (self.openTimerList, _("Show timer list")),
			"timerlong": (self.openAutoTimerList, _("Show autotimer list")),
			"back": (self.goToCurrentTimeOrService, _("Go to current time, then the start service")),
			"menu": (self.createSetup, _("Setup menu"))
		}, prio=-1, description=helpDescription)
		self["epgcursoractions"] = HelpableActionMap(self, "DirectionActions", {
			"left": (self.prevPage, _("Move up a page")),
			"right": (self.nextPage, _("Move down a page")),
			"up": (self.moveUp, _("Go to previous channel")),
			"down": (self.moveDown, _("Go to next channel"))
		}, prio=-1, description=helpDescription)

		self.timeFocus = timeFocus or time()

		self["list"] = EPGListSingle(session, selChangedCB=self.onSelectionChanged, epgConfig=config.epgselection.single)
Пример #2
0
 def zapSelectedService(self, preview=False):
     if self.epgConfig.preview_mode.value != "2" or not preview:
         EPGServiceZap.zapSelectedService(self)
         return
     # Preview mode is set to PiP
     currentService = self.session.nav.getCurrentlyPlayingServiceReference(
     ) and self.session.nav.getCurrentlyPlayingServiceReference().toString(
     ) or None
     selectedService = self["list"].getCurrent()[1]
     if selectedService is None:
         return
     if self.session.pipshown:
         self.prevch = self.session.pip.getCurrentService(
         ) and self.session.pip.getCurrentService().toString() or None
     pipPluginService = self.pipServiceRelation.get(
         selectedService.toString(), None)
     serviceRef = pipPluginService or selectedService
     if self.currch == serviceRef.toString():
         closePip()
         self.zapFunc(selectedService,
                      bouquet=self.getCurrentBouquet(),
                      preview=False)
         return
     if self.prevch != serviceRef.toString(
     ) and currentService != serviceRef.toString():
         if openPip(serviceRef):
             self.__openedPip = True
         self.currch = self.session.pip.getCurrentService(
         ) and self.session.pip.getCurrentService().toString()
    def __init__(self, session, zapFunc, startBouquet, startRef, bouquets):
        EPGSelectionBase.__init__(self, session, config.epgselection.multi,
                                  startBouquet, startRef, bouquets)
        EPGBouquetSelection.__init__(self, False)
        EPGServiceZap.__init__(self, zapFunc)
        self.skinName = ["MultiEPG", "EPGSelectionMulti"]
        self.askTime = -1

        self["now_button"] = Pixmap()
        self["next_button"] = Pixmap()
        self["more_button"] = Pixmap()
        self["now_button_sel"] = Pixmap()
        self["next_button_sel"] = Pixmap()
        self["more_button_sel"] = Pixmap()
        self["now_text"] = Label()
        self["next_text"] = Label()
        self["more_text"] = Label()
        self["date"] = Label()

        helpDescription = _("EPG Commands")
        self["epgcursoractions"] = HelpableActionMap(
            self,
            "DirectionActions", {
                "left": (self.leftPressed, _("Go to previous event")),
                "right": (self.rightPressed, _("Go to next event")),
                "up": (self.moveUp, _("Go to previous channel")),
                "down": (self.moveDown, _("Go to next channel"))
            },
            prio=-1,
            description=helpDescription)
        self["epgactions"] = HelpableActionMap(
            self,
            "EPGSelectActions", {
                "nextService": (self.nextPage, _("Move down a page")),
                "prevService": (self.prevPage, _("Move up a page")),
                "nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
                "prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
                "input_date_time":
                (self.enterDateTime, _("Go to specific data/time")),
                "epg":
                (self.openSingleEPG, _("Show single epg for current channel")),
                "info": (self.openEventView, _("Show detailed event info")),
                "infolong":
                (self.openSingleEPG, _("Show single epg for current channel")),
                "tv": (self.toggleBouquetList,
                       _("Toggle between bouquet/epg lists")),
                "timer": (self.openTimerList, _("Show timer list")),
                "timerlong":
                (self.openAutoTimerList, _("Show autotimer list")),
                "menu": (self.createSetup, _("Setup menu"))
            },
            prio=-1,
            description=helpDescription)

        self["list"] = EPGListMulti(session,
                                    selChangedCB=self.onSelectionChanged)
Пример #4
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)
Пример #5
0
    def __init__(self, session, zapFunc, startBouquet, startRef, bouquets):
        UserDefinedButtons.__init__(self, config.epgselection.infobar,
                                    epgActions, okActions)
        EPGSelectionBase.__init__(self, session, config.epgselection.infobar,
                                  startBouquet, startRef, bouquets)
        EPGServiceZap.__init__(self, zapFunc)

        self.skinName = ["InfobarSingleEPG", "QuickEPG"]

        EPGServiceBrowse.__init__(self)

        helpDescription = _("EPG Commands")
        self["epgactions"] = HelpableActionMap(
            self,
            "EPGSelectActions", {
                "nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
                "prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
                "nextService": (self.nextPage, _("Move down a page")),
                "prevService": (self.prevPage, _("Move up a page")),
                "epg":
                (self.openSingleEPG, _("Show single epg for current channel")),
                "info": (self.openEventView, _("Show detailed event info")),
                "infolong":
                (self.openSingleEPG, _("Show single epg for current channel")),
                "timer": (self.openTimerList, _("Show timer list")),
                "timerlong":
                (self.openAutoTimerList, _("Show autotimer list")),
                "menu": (self.createSetup, _("Setup menu"))
            },
            prio=-1,
            description=helpDescription)
        self["epgcursoractions"] = HelpableActionMap(
            self,
            "DirectionActions", {
                "left": (self.prevService, _("Go to previous channel")),
                "right": (self.nextService, _("Go to next channel")),
                "up": (self.moveUp, _("Go to previous channel")),
                "down": (self.moveDown, _("Go to next channel"))
            },
            prio=-1,
            description=helpDescription)

        self["list"] = EPGListSingle(session,
                                     epgConfig=config.epgselection.infobar,
                                     selChangedCB=self.onSelectionChanged)
Пример #6
0
    def __init__(self,
                 session,
                 zapFunc,
                 startBouquet,
                 startRef,
                 bouquets,
                 timeFocus=-1):
        UserDefinedButtons.__init__(self, config.epgselection.multi,
                                    epgActions, okActions)
        EPGSelectionBase.__init__(self, session, config.epgselection.multi,
                                  startBouquet, startRef, bouquets)
        EPGBouquetSelection.__init__(self, False)
        EPGServiceNumberSelection.__init__(self)
        EPGServiceZap.__init__(self, zapFunc)

        self.skinName = ["MultiEPG", "EPGSelectionMulti"]
        self.askTime = timeFocus

        self["now_button"] = Pixmap()
        self["next_button"] = Pixmap()
        self["more_button"] = Pixmap()
        self["now_button_sel"] = Pixmap()
        self["next_button_sel"] = Pixmap()
        self["more_button_sel"] = Pixmap()
        self["now_text"] = Label()
        self["next_text"] = Label()
        self["more_text"] = Label()
        self["date"] = Label()
        self["key_text"] = StaticText(_("TEXT"))

        helpDescription = _("EPG Commands")
        self["epgcursoractions"] = HelpableActionMap(
            self,
            "DirectionActions", {
                "left": (self.leftPressed, _("Go to previous event")),
                "right": (self.rightPressed, _("Go to next event")),
                "up": (self.moveUp, _("Go to previous channel")),
                "down": (self.moveDown, _("Go to next channel"))
            },
            prio=-1,
            description=helpDescription)
        self["epgactions"] = HelpableActionMap(
            self,
            "EPGSelectActions", {
                "nextService": (self.nextPage, _("Move down a page")),
                "prevService": (self.prevPage, _("Move up a page")),
                "nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
                "prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
                "input_date_time":
                (self.enterDateTime, _("Go to specific data/time")),
                "epg":
                self.helpKeyAction("epg"),
                "epglong":
                self.helpKeyAction("epglong"),
                "info":
                self.helpKeyAction("info"),
                "infolong":
                self.helpKeyAction("infolong"),
                "tv": (self.toggleBouquetList,
                       _("Toggle between bouquet/epg lists")),
                "timer": (self.openTimerList, _("Show timer list")),
                "timerlong":
                (self.openAutoTimerList, _("Show autotimer list")),
                "back": (self.goToCurrentTimeOrServiceOrTop,
                         _("Go to current time, then the start service")),
                "menu": (self.createSetup, _("Setup menu"))
            },
            prio=-1,
            description=helpDescription)

        self["list"] = EPGListMulti(session,
                                    selChangedCB=self.onSelectionChanged)
Пример #7
0
 def EPGSearch_init(self, session):
     EPGServiceZap.__init__(self, InfoBar.instance.zapToService)
Пример #8
0
	def __init__(self, session, zapFunc, startBouquet, startRef, bouquets, timeFocus=None, isInfobar=False):
		self.epgConfig = config.epgselection.infobar if isInfobar else config.epgselection.grid 
		UserDefinedButtons.__init__(self, self.epgConfig, epgActions, okActions, infoActions)
		EPGSelectionBase.__init__(self, session, self.epgConfig, startBouquet, startRef, bouquets)
		EPGServiceNumberSelection.__init__(self)
		EPGServiceZap.__init__(self, zapFunc)

		graphic = self.epgConfig.type_mode.value == "graphics"
		if not config.epgselection.grid.pig.value:
			self.skinName = ["GridEPG", "GraphicalEPG"]
		else:
			self.skinName = ["GridEPGPIG", "GraphicalEPGPIG"]
		self.closeRecursive = False
		EPGBouquetSelection.__init__(self, graphic)

		self["timeline_text"] = TimelineText(self.epgConfig, graphic)
		self["Event"] = Event()
		self["primetime"] = Label(_("PRIMETIME"))
		self["change_bouquet"] = Label(_("CHANGE BOUQUET"))
		self["jump"] = Label(_("JUMP 24 HOURS"))
		self["page"] = Label(_("PAGE UP/DOWN"))
		self.timeLines = []
		for x in range(0, MAX_TIMELINES):
			pm = Pixmap()
			self.timeLines.append(pm)
			self["timeline%d" % x] = pm

		self["timeline_now"] = Pixmap()
		self.updateTimelineTimer = eTimer()
		self.updateTimelineTimer.callback.append(self.moveTimeLines)
		self.updateTimelineTimer.start(60000)
		
		helpDescription = _("EPG Commands")
		self["epgcursoractions"] = HelpableActionMap(self, "DirectionActions", {
			"left": (self.leftPressed, _("Go to previous event")),
			"right": (self.rightPressed, _("Go to next event")),
			"up": (self.moveUp, _("Go to previous channel")),
			"down": (self.moveDown, _("Go to next channel"))
		}, prio=-1, description=helpDescription)
		
		self["epgactions"] = HelpableActionMap(self, "EPGSelectActions", {
			"nextService": self.helpKeyAction("channelup"),
			"prevService": self.helpKeyAction("channeldown"),
			"nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
			"prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
			"input_date_time": (self.enterDateTime, _("Go to specific date/time")),
			"epg": self.helpKeyAction("epg"),
			"epglong": self.helpKeyAction("epglong"),
			"info": self.helpKeyAction("info"),
			"infolong": self.helpKeyAction("infolong"),
			"tv": (self.toggleBouquetList, _("Toggle between bouquet/epg lists")),
			"tvlong": (self.togglePIG, _("Toggle picture In graphics")),
			"timer": (self.openTimerList, _("Show timer list")),
			"timerlong": (self.openAutoTimerList, _("Show autotimer list")),
			"back": (self.goToCurrentTimeOrServiceOrTop, _("Go to current time, then the start service, then home of list")),
			"menu": (self.createSetup, _("Setup menu"))
		}, prio=-1, description=helpDescription)

		if config.epgselection.grid.number_buttons_mode.value == "paging":
			self["numberactions"] = HelpableActionMap(self, "NumberActions", {
				"1": (self.reduceTimeScale, _("Reduce time scale")),
				"2": (self.prevPage, _("Page up")),
				"3": (self.increaseTimeScale, _("Increase time scale")),
				"4": (self.pageLeft, _("page left")),
				"5": (self.goToCurrentTime, _("Jump to current time")),
				"6": (self.pageRight, _("Page right")),
				"7": (self.toggleNumberOfRows, _("No of items switch (increase or reduced)")),
				"8": (self.nextPage, _("Page down")),
				"9": (self.goToPrimeTime, _("Jump to prime time")),
				"0": (self.goToCurrentTimeAndTop, _("Move to home of list"))
			}, prio=-1, description=helpDescription)
		self["list"] = EPGListGrid(session, isInfobar=isInfobar, selChangedCB=self.onSelectionChanged)
		self["list"].setTimeFocus(timeFocus or time())
Пример #9
0
 def closeScreen(self):
     EPGServiceZap.closeScreen(self)
     # be nice and only close the PiP if we actually opened a preview PiP
     if self.__openedPip:
         closePip()