Exemple #1
0
 def __init__(self, session, args=None):
     Screen.__init__(self, session)
     self.sliderPackages = {
         'ceryon-dvb-modules': 1,
         'broadmedia-dvb-modules': 2,
         'ini-dvb-modules': 3,
         'enigma2': 4,
         'egami-version-info': 5
     }
     self.slider = Slider(0, 4)
     self['slider'] = self.slider
     self.activityslider = Slider(0, 100)
     self['activityslider'] = self.activityslider
     self.status = StaticText(_('Please wait...'))
     self['status'] = self.status
     self.package = StaticText(_('Verifying your internet connection...'))
     self['package'] = self.package
     self.oktext = _('Press OK on your remote control to continue.')
     self.packages = 0
     self.error = 0
     self.processed_packages = []
     self.activity = 0
     self.activityTimer = eTimer()
     self.activityTimer.callback.append(self.doActivityTimer)
     self.ipkg = IpkgComponent()
     self.ipkg.addCallback(self.ipkgCallback)
     self.updating = False
     self['actions'] = ActionMap(['WizardActions'], {
         'ok': self.exit,
         'back': self.exit
     }, -1)
     self['actions'].csel = self
     self['actions'].setEnabled(False)
     iNetwork.checkNetworkState(self.checkNetworkCB)
     self.onClose.append(self.cleanup)
Exemple #2
0
 def __init__(self, event, ref, callback = None, similarEPGCB = None):
     self.similarEPGCB = similarEPGCB
     self.cbFunc = callback
     self.currentService = ref
     self.isRecording = not ref.ref.flags & eServiceReference.isGroup and ref.ref.getPath()
     self.event = event
     self['Service'] = ServiceEvent()
     self['Event'] = Event()
     self['epg_description'] = ScrollLabel()
     self['FullDescription'] = ScrollLabel()
     self['summary_description'] = StaticText()
     self['datetime'] = Label()
     self['channel'] = Label()
     self['duration'] = Label()
     if similarEPGCB is not None:
         self['key_red'] = Button('')
         self.SimilarBroadcastTimer = eTimer()
         self.SimilarBroadcastTimer.callback.append(self.getSimilarEvents)
     else:
         self.SimilarBroadcastTimer = None
     self['actions'] = ActionMap(['OkCancelActions', 'EventViewActions'], {'cancel': self.close,
      'ok': self.close,
      'info': self.close,
      'pageUp': self.pageUp,
      'pageDown': self.pageDown,
      'prevEvent': self.prevEvent,
      'nextEvent': self.nextEvent,
      'contextMenu': self.doContext})
     self['dialogactions'] = ActionMap(['WizardActions'], {'back': self.closeChoiceBoxDialog}, -1)
     self['dialogactions'].csel = self
     self['dialogactions'].setEnabled(False)
     self.onLayoutFinish.append(self.onCreate)
Exemple #3
0
	def __init__(self, session, services, zapFunc=None, bouquetChangeCB=None):
		Screen.__init__(self, session)
		self.bouquetChangeCB = bouquetChangeCB
		now = time()
		tmp = now % 900
		self.ask_time = now - tmp
		self.closeRecursive = False
		self["key_red"] = Button("")
		self["key_green"] = Button("")
		self["key_yellow"] = Button(_("Prime time"))
		self["key_blue"] = Button(_("Date"))
		self.key_green_choice = self.EMPTY
		self.key_red_choice = self.EMPTY
		self["timeline_text"] = TimelineText()
		self["Event"] = Event()
		self.time_lines = [ ]
		for x in (0,1,2,3,4,5):
			pm = Pixmap()
			self.time_lines.append(pm)
			self["timeline%d"%(x)] = pm
		self["timeline_now"] = Pixmap()
		self.services = services
		self.zapFunc = zapFunc
		self.prime_mode = self.TIME_NOW

		self["list"] = EPGList(selChangedCB = self.onSelectionChanged, timer = self.session.nav.RecordTimer, time_epoch = config.misc.graph_mepg_prev_time_period.value )

		self["actions"] = ActionMap(["EPGSelectActions", "OkCancelActions"],
			{
				"cancel": self.closeScreen,
				"ok": self.eventSelected,
				"timerAdd": self.timerAdd,
				"info": self.infoKeyPressed,
				"red": self.zapTo,
				"yellow": self.primeTime,
				"blue" : self.enterDateTime,
				"input_date_time": self.configMenu,
				"nextBouquet": self.nextBouquet,
				"prevBouquet": self.prevBouquet,
			})
		self["actions"].csel = self

		self["input_actions"] = ActionMap(["InputActions"],
			{
				"left": self.leftPressed,
				"right": self.rightPressed,
				"1": self.key1,
				"2": self.key2,
				"3": self.key3,
				"4": self.key4,
				"5": self.key5,
			},-1)

		self.updateTimelineTimer = eTimer()
		self.updateTimelineTimer_conn = self.updateTimelineTimer.timeout.connect(self.moveTimeLines)
		self.updateTimelineTimer.start(60*1000)
		self.onLayoutFinish.append(self.onCreate)
    def __init__(self, session, services, zapFunc=None, bouquetChangeCB=None):
        Screen.__init__(self, session)
        self.bouquetChangeCB = bouquetChangeCB
        now = time()
        tmp = now % 900
        self.ask_time = now - tmp
        self.closeRecursive = False
        self["key_red"] = Button("")
        self["key_green"] = Button("")
        self.key_green_choice = self.EMPTY
        self.key_red_choice = self.EMPTY
        self["timeline_text"] = TimelineText()
        self["Event"] = Event()
        self.time_lines = []
        for x in (0, 1, 2, 3, 4, 5):
            pm = Pixmap()
            self.time_lines.append(pm)
            self["timeline%d" % (x)] = pm
        self["timeline_now"] = Pixmap()
        self.services = services
        self.zapFunc = zapFunc

        self["list"] = EPGList(
            selChangedCB=self.onSelectionChanged,
            timer=self.session.nav.RecordTimer,
            time_epoch=config.misc.graph_mepg_prev_time_period.value)

        self["actions"] = ActionMap(
            ["EPGSelectActions", "OkCancelActions"], {
                "cancel": self.closeScreen,
                "ok": self.eventSelected,
                "timerAdd": self.timerAdd,
                "info": self.infoKeyPressed,
                "red": self.zapTo,
                "input_date_time": self.enterDateTime,
                "nextBouquet": self.nextBouquet,
                "prevBouquet": self.prevBouquet,
            })
        self["actions"].csel = self

        self["input_actions"] = ActionMap(
            ["InputActions"], {
                "left": self.leftPressed,
                "right": self.rightPressed,
                "1": self.key1,
                "2": self.key2,
                "3": self.key3,
                "4": self.key4,
                "5": self.key5,
            }, -1)

        self.updateTimelineTimer = eTimer()
        self.updateTimelineTimer.callback.append(self.moveTimeLines)
        self.updateTimelineTimer.start(60 * 1000)
        self.onLayoutFinish.append(self.onCreate)
    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)
Exemple #6
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)
Exemple #7
0
 def __init__(self, event, ref, callback=None, similarEPGCB=None):
     self.similarEPGCB = similarEPGCB
     self.cbFunc = callback
     self.currentService = ref
     self.isRecording = (
         not ref.ref.flags & eServiceReference.isGroup
     ) and ref.ref.getPath() and ref.ref.getPath()[0] == '/'
     self.event = event
     self["Service"] = ServiceEvent()
     self["Event"] = Event()
     self["epg_eventname"] = ScrollLabel()
     self["epg_description"] = ScrollLabel()
     self["FullDescription"] = ScrollLabel()
     self["summary_description"] = StaticText()
     self["datetime"] = Label()
     self["channel"] = Label()
     self["duration"] = Label()
     if [
             p for p in plugins.getPlugins(PluginDescriptor.WHERE_EVENTINFO)
             if 'servicelist' not in p.__call__.func_code.co_varnames
     ]:
         self["key_menu"] = StaticText(_("MENU"))
     if similarEPGCB is not None:
         self["key_red"] = Button("")
         self.SimilarBroadcastTimer = eTimer()
         self.SimilarBroadcastTimer.callback.append(self.getSimilarEvents)
     else:
         self.SimilarBroadcastTimer = None
     self["actions"] = ActionMap(
         ["OkCancelActions", "EventViewActions"], {
             "cancel": self.close,
             "ok": self.close,
             "pageUp": self.pageUp,
             "pageDown": self.pageDown,
             "prevEvent": self.prevEvent,
             "nextEvent": self.nextEvent,
             "contextMenu": self.doContext,
         })
     self['dialogactions'] = ActionMap(['WizardActions'], {
         'back': self.closeChoiceBoxDialog,
     }, -1)
     self['dialogactions'].csel = self
     self["dialogactions"].setEnabled(False)
     self.onLayoutFinish.append(self.onCreate)
Exemple #8
0
 def __init__(self, event, ref, callback=None, similarEPGCB=None):
     self.similarEPGCB = similarEPGCB
     self.cbFunc = callback
     self.currentService = ref
     self.isRecording = (not ref.ref.flags
                         & eServiceReference.isGroup) and ref.ref.getPath()
     self.event = event
     self["Service"] = ServiceEvent()
     self["Event"] = Event()
     self["epg_description"] = ScrollLabel()
     self["FullDescription"] = ScrollLabel()
     self["summary_description"] = StaticText()
     self["datetime"] = Label()
     self["channel"] = Label()
     self["duration"] = Label()
     self["key_red"] = Button()
     self["key_green"] = Button()
     self["key_yellow"] = Button()
     self["key_blue"] = Button()
     if similarEPGCB is not None:
         self.SimilarBroadcastTimer = eTimer()
         self.SimilarBroadcastTimer.callback.append(self.getSimilarEvents)
     else:
         self.SimilarBroadcastTimer = None
     self["actions"] = ActionMap(
         ["OkCancelActions", "EventViewActions"], {
             "cancel": self.close,
             "ok": self.close,
             "pageUp": self.pageUp,
             "pageDown": self.pageDown,
             "prevEvent": self.prevEvent,
             "nextEvent": self.nextEvent,
             "contextMenu": self.doContext,
         })
     self['dialogactions'] = ActionMap(['WizardActions'], {
         'back': self.closeChoiceBoxDialog,
     }, -1)
     self['dialogactions'].csel = self
     self["dialogactions"].setEnabled(False)
     self.onLayoutFinish.append(self.onCreate)
Exemple #9
0
 def __init__(self, event, ref, callback=None, similarEPGCB=None):
     self.similarEPGCB = similarEPGCB
     self.cbFunc = callback
     self.currentService = ref
     self.isRecording = not ref.ref.flags & eServiceReference.isGroup and ref.ref.getPath(
     )
     self.event = event
     self['Service'] = ServiceEvent()
     self['Event'] = Event()
     self['epg_description'] = ScrollLabel()
     self['FullDescription'] = ScrollLabel()
     self['summary_description'] = StaticText()
     self['datetime'] = Label()
     self['channel'] = Label()
     self['duration'] = Label()
     if similarEPGCB is not None:
         self['key_red'] = Button('')
         self.SimilarBroadcastTimer = eTimer()
         self.SimilarBroadcastTimer.callback.append(self.getSimilarEvents)
     else:
         self.SimilarBroadcastTimer = None
     self['actions'] = ActionMap(
         ['OkCancelActions', 'EventViewActions'], {
             'cancel': self.close,
             'ok': self.close,
             'info': self.close,
             'pageUp': self.pageUp,
             'pageDown': self.pageDown,
             'prevEvent': self.prevEvent,
             'nextEvent': self.nextEvent,
             'contextMenu': self.doContext
         })
     self['dialogactions'] = ActionMap(['WizardActions'],
                                       {'back': self.closeChoiceBoxDialog},
                                       -1)
     self['dialogactions'].csel = self
     self['dialogactions'].setEnabled(False)
     self.onLayoutFinish.append(self.onCreate)
     return
Exemple #10
0
	def __init__(self, event, ref, callback=None, similarEPGCB=None):
		self.similarEPGCB = similarEPGCB
		self.cbFunc = callback
		self.currentService = ref
		self.isRecording = (not ref.ref.flags & eServiceReference.isGroup) and ref.ref.getPath()
		self.event = event
		self["Service"] = ServiceEvent()
		self["Event"] = Event()
		self["epg_description"] = ScrollLabel()
		self["FullDescription"] = ScrollLabel()
		self["summary_description"] = StaticText()
		self["datetime"] = Label()
		self["channel"] = Label()
		self["duration"] = Label()
		if similarEPGCB is not None:
			self["key_red"] = Button("")
			self.SimilarBroadcastTimer = eTimer()
			self.SimilarBroadcastTimer.callback.append(self.getSimilarEvents)
		else:
			self.SimilarBroadcastTimer = None
		self["actions"] = ActionMap(["OkCancelActions", "EventViewActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"info": self.close,
				"pageUp": self.pageUp,
				"pageDown": self.pageDown,
				"prevEvent": self.prevEvent,
				"nextEvent": self.nextEvent,
				"contextMenu": self.doContext,
			})
		self['dialogactions'] = ActionMap(['WizardActions'],
			{
				'back': self.closeChoiceBoxDialog,
			}, -1)
		self['dialogactions'].csel = self
		self["dialogactions"].setEnabled(False)
		self.onLayoutFinish.append(self.onCreate)
Exemple #11
0
 def __init__(self, session, *args):
     Screen.__init__(self, session)
     ProtectedScreen.__init__(self)
     Screen.setTitle(self, _('Software Update'))
     self['actions'] = ActionMap(['WizardActions'], {'ok': self.exit,
      'back': self.exit}, -1)
     self['actions'].csel = self
     self['actions'].setEnabled(False)
     self.sliderPackages = {'ini-dvb-modules': 1,
      'enigma2': 2,
      'tuxbox-image-info': 3}
     self.slider = Slider(0, 4)
     self['slider'] = self.slider
     self.activityslider = Slider(0, 100)
     self['activityslider'] = self.activityslider
     self.status = StaticText(_('Please wait...'))
     self['status'] = self.status
     self.package = StaticText(_('Package list update'))
     self['package'] = self.package
     self.oktext = _('Press OK on your remote control to continue.')
     self['tl_off'] = Pixmap()
     self['tl_red'] = Pixmap()
     self['tl_yellow'] = Pixmap()
     self['tl_green'] = Pixmap()
     self['feedStatusMSG'] = Label()
     self.channellist_only = 0
     self.channellist_name = ''
     self.SettingsBackupDone = False
     self.ImageBackupDone = False
     self.autobackuprunning = False
     self.updating = False
     self.packages = 0
     self.error = 0
     self.processed_packages = []
     self.total_packages = None
     self.onFirstExecBegin.append(self.checkNetworkState)
     return
Exemple #12
0
 def __init__(self, session, *args):
     Screen.__init__(self, session)
     ProtectedScreen.__init__(self)
     Screen.setTitle(self, _('Software Update'))
     self['actions'] = ActionMap(['WizardActions'], {'ok': self.exit,
        'back': self.exit
        }, -1)
     self['actions'].csel = self
     self['actions'].setEnabled(False)
     self.sliderPackages = {'ini-dvb-modules': 1,'enigma2': 2,'tuxbox-image-info': 3}
     self.slider = Slider(0, 4)
     self['slider'] = self.slider
     self.activityslider = Slider(0, 100)
     self['activityslider'] = self.activityslider
     self.status = StaticText(_('Please wait...'))
     self['status'] = self.status
     self.package = StaticText(_('Package list update'))
     self['package'] = self.package
     self.oktext = _('Press OK on your remote control to continue.')
     self['tl_off'] = Pixmap()
     self['tl_red'] = Pixmap()
     self['tl_yellow'] = Pixmap()
     self['tl_green'] = Pixmap()
     self['feedStatusMSG'] = Label()
     self.channellist_only = 0
     self.channellist_name = ''
     self.SettingsBackupDone = False
     self.ImageBackupDone = False
     self.autobackuprunning = False
     self.updating = False
     self.packages = 0
     self.error = 0
     self.processed_packages = []
     self.total_packages = None
     self.onFirstExecBegin.append(self.checkNetworkState)
     return
Exemple #13
0
    def __init__(self,
                 session,
                 service,
                 zapFunc=None,
                 eventid=None,
                 bouquetChangeCB=None,
                 serviceChangeCB=None):
        Screen.__init__(self, session)
        self.bouquetChangeCB = bouquetChangeCB
        self.serviceChangeCB = serviceChangeCB
        self.ask_time = -1  #now
        self["key_red"] = Button("")
        self.closeRecursive = False
        self.saved_title = None
        self["Service"] = ServiceEvent()
        self["Event"] = Event()
        self.session = session
        if isinstance(service, str) and eventid != None:
            self.type = EPG_TYPE_SIMILAR
            self["key_yellow"] = Button()
            self["key_blue"] = Button()
            self["key_red"] = Button()
            self.currentService = service
            self.eventid = eventid
            self.zapFunc = None
        elif isinstance(service, eServiceReference) or isinstance(
                service, str):
            self.type = EPG_TYPE_SINGLE
            self["key_yellow"] = Button()
            self["key_blue"] = Button()
            self.currentService = ServiceReference(service)
            self.zapFunc = zapFunc
            self.sort_type = 0
            self.setSortDescription()
        else:
            self.skinName = "EPGSelectionMulti"
            self.type = EPG_TYPE_MULTI
            self["key_yellow"] = Button(
                pgettext("button label, 'previous screen'", "Prev"))
            self["key_blue"] = Button(
                pgettext("button label, 'next screen'", "Next"))
            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.services = service
            self.zapFunc = zapFunc

        self["key_green"] = Button(_("Add timer"))
        self.key_green_choice = self.ADD_TIMER
        self.key_red_choice = self.EMPTY
        self["list"] = EPGList(type=self.type,
                               selChangedCB=self.onSelectionChanged,
                               timer=session.nav.RecordTimer)

        self["actions"] = ActionMap(
            ["EPGSelectActions", "OkCancelActions"],
            {
                "cancel": self.closeScreen,
                "ok": self.eventSelected,
                "timerAdd": self.timerAdd,
                "yellow": self.yellowButtonPressed,
                "blue": self.blueButtonPressed,
                "info": self.infoKeyPressed,
                "red": self.zapTo,
                "menu": self.furtherOptions,
                "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
                "preview": self.eventPreview,
            })
        self["actions"].csel = self
        self.onLayoutFinish.append(self.onCreate)
Exemple #14
0
    def __init__(self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None):
        Screen.__init__(self, session)
        self.bouquetChangeCB = bouquetChangeCB
        self.serviceChangeCB = serviceChangeCB
        self.ask_time = -1  # now
        self["key_red"] = Button("")
        self.closeRecursive = False
        self.saved_title = None
        self["Service"] = ServiceEvent()
        self["Event"] = Event()
        if isinstance(service, str) and eventid != None:
            self.type = EPG_TYPE_SIMILAR
            self["key_yellow"] = Button()
            self["key_blue"] = Button()
            self["key_red"] = Button()
            self.currentService = service
            self.eventid = eventid
            self.zapFunc = None
        elif isinstance(service, eServiceReference) or isinstance(service, str):
            self.type = EPG_TYPE_SINGLE
            self["key_yellow"] = Button()
            self["key_blue"] = Button()
            self.currentService = ServiceReference(service)
            self.zapFunc = zapFunc
            self.sort_type = 0
            self.setSortDescription()
        else:
            self.skinName = "EPGSelectionMulti"
            self.type = EPG_TYPE_MULTI
            self["key_yellow"] = Button(pgettext("button label, 'previous screen'", "Prev"))
            self["key_blue"] = Button(pgettext("button label, 'next screen'", "Next"))
            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.services = service
            self.zapFunc = zapFunc

        self["key_green"] = Button(_("Add timer"))
        self.key_green_choice = self.ADD_TIMER
        self.key_red_choice = self.EMPTY
        self["list"] = EPGList(type=self.type, selChangedCB=self.onSelectionChanged, timer=session.nav.RecordTimer)

        self["actions"] = ActionMap(
            ["EPGSelectActions", "OkCancelActions"],
            {
                "cancel": self.closeScreen,
                "ok": self.eventSelected,
                "timerAdd": self.timerAdd,
                "yellow": self.yellowButtonPressed,
                "blue": self.blueButtonPressed,
                "info": self.infoKeyPressed,
                "red": self.zapTo,
                "menu": self.enterDateTime,
                "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
                "preview": self.eventPreview,
            },
        )
        self["actions"].csel = self
        self.onLayoutFinish.append(self.onCreate)
Exemple #15
0
    def __init__(self,
                 session,
                 service,
                 zapFunc=None,
                 eventid=None,
                 bouquetChangeCB=None,
                 serviceChangeCB=None,
                 isEPGBar=None,
                 switchBouquet=None,
                 EPGNumberZap=None,
                 togglePiP=None):
        Screen.__init__(self, session)
        self.screentitle = _("EPG Selection")
        self.bouquetChangeCB = bouquetChangeCB
        self.serviceChangeCB = serviceChangeCB
        self.switchBouquet = switchBouquet
        self.EPGNumberZap = EPGNumberZap
        self.togglePiP = None
        self.ask_time = -1  #now
        self["key_red"] = Button("")
        self.closeRecursive = False
        self.saved_title = None
        self["Service"] = ServiceEvent()
        self["Event"] = Event()
        if isinstance(service, str) and eventid != None:
            self.type = EPG_TYPE_SIMILAR
            self["key_yellow"] = Button()
            self["key_blue"] = Button()
            self["key_red"] = Button()
            self.currentService = service
            self.eventid = eventid
            self.zapFunc = None
        elif isEPGBar and (isinstance(service, eServiceReference)
                           or isinstance(service, str)):
            self.skinName = ["EPGSelectionEPGBar_SD"]
            if session.desktop.size().width() > 720:
                self.skinName = ["EPGSelectionEPGBar_HD"]
            self.type = EPG_TYPE_EPGBAR
            self["key_yellow"] = Button()
            self["key_blue"] = Button()
            self.currentService = ServiceReference(service)
            self.zapFunc = zapFunc
            self.togglePiP = togglePiP
            self.sort_type = 0
            self.setSortDescription()

            self["EPGBarActions"] = ActionMap(
                ["DirectionActions", "OkCancelActions", "InfobarSeekActions"],
                {
                    "cancel": self.closeScreen,
                    "ok": self.zapTo,
                    "left": self.prevService,
                    "right": self.nextService,
                    "playpauseService": self.setPiPService,
                }, -1)

            self["EPGBarActions"].csel = self

        elif isinstance(service, eServiceReference) or isinstance(
                service, str):
            self.type = EPG_TYPE_SINGLE
            self["key_yellow"] = Button()
            self["key_blue"] = Button()
            self.currentService = ServiceReference(service)
            self.zapFunc = zapFunc
            self.sort_type = 0
            self.setSortDescription()
        else:
            self.skinName = "EPGSelectionMulti"
            self.type = EPG_TYPE_MULTI
            self["key_yellow"] = Button(_("Prev"))
            self["key_blue"] = Button(_("Next"))
            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.services = service
            self.zapFunc = zapFunc

        self["key_green"] = Button(_("Add timer"))
        self.key_green_choice = self.ADD_TIMER
        self.key_red_choice = self.EMPTY
        self["list"] = EPGList(type=self.type,
                               selChangedCB=self.onSelectionChanged,
                               timer=session.nav.RecordTimer)

        self["actions"] = ActionMap(
            ["EPGSelectActions", "OkCancelActions"],
            {
                "cancel": self.closeScreen,
                "ok": self.eventSelected,
                "timerAdd": self.timerAdd,
                "timerEnableDisable": self.timerEnableDisable,
                "instantToggleTimerState": self.instantToggleTimerState,
                "instantTimer": self.addInstantTimer,
                "yellow": self.yellowButtonPressed,
                "blue": self.blueButtonPressed,
                "info": self.infoKeyPressed,
                "red": self.zapTo,
                "input_date_time": self.enterDateTime,
                "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

        if EPGNumberZap:
            self["EPGBarNumberActions"] = NumberActionMap(
                ["NumberActions"], {
                    "1": self.keyNumberGlobal,
                    "2": self.keyNumberGlobal,
                    "3": self.keyNumberGlobal,
                    "4": self.keyNumberGlobal,
                    "5": self.keyNumberGlobal,
                    "6": self.keyNumberGlobal,
                    "7": self.keyNumberGlobal,
                    "8": self.keyNumberGlobal,
                    "9": self.keyNumberGlobal,
                })

        self.onLayoutFinish.append(self.onCreate)
	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
				})
Exemple #17
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
				})
Exemple #18
0
    def __init__(self,
                 session,
                 service,
                 zapFunc=None,
                 eventid=None,
                 bouquetChangeCB=None,
                 serviceChangeCB=None,
                 parent=None):
        Screen.__init__(self, session)
        self.bouquetChangeCB = bouquetChangeCB
        self.serviceChangeCB = serviceChangeCB
        self.ask_time = -1  #now
        self["key_red"] = StaticText("")
        self.closeRecursive = False
        self.saved_title = None
        self["Service"] = ServiceEvent()
        self["Event"] = Event()
        self.session = session
        self.Console = Console()
        if isinstance(service, str) and eventid is not None:
            self.type = EPG_TYPE_SIMILAR
            self.setTitle(_("Similar EPG"))
            self["key_yellow"] = StaticText()
            self["key_blue"] = StaticText()
            self["key_red"] = StaticText()
            self.currentService = service
            self.eventid = eventid
            self.zapFunc = None
        elif isinstance(service, eServiceReference) or isinstance(
                service, str):
            self.setTitle(_("Single EPG"))
            self.type = EPG_TYPE_SINGLE
            self["key_yellow"] = StaticText()
            self["key_blue"] = StaticText(_("Select Channel"))
            self.currentService = ServiceReference(service)
            self.zapFunc = zapFunc
            self.sort_type = 0
            self.setSortDescription()
        else:
            self.setTitle(_("Multi EPG"))
            self.skinName = "EPGSelectionMulti"
            self.type = EPG_TYPE_MULTI
            if self.bouquetChangeCB == StaticText:
                self["key_yellow"] = StaticText(
                    pgettext("button label, 'previous screen'", "Prev"))
                self["key_blue"] = StaticText(
                    pgettext("button label, 'next screen'", "Next"))
            else:
                self["key_yellow"] = Button(
                    pgettext("button label, 'previous screen'", "Prev"))
                self["key_blue"] = Button(
                    pgettext("button label, 'next screen'", "Next"))
            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.services = service
            self.zapFunc = zapFunc
        self.parent = parent
        if self.bouquetChangeCB == StaticText:
            self["key_green"] = StaticText(_("Add timer"))
        else:
            self["key_green"] = Button(_("Add timer"))
        self.key_green_choice = self.ADD_TIMER
        self.key_red_choice = self.EMPTY
        self["list"] = EPGList(type=self.type,
                               selChangedCB=self.onSelectionChanged,
                               timer=session.nav.RecordTimer)

        self["actions"] = ActionMap(
            ["EPGSelectActions", "OkCancelActions"],
            {
                "cancel": self.closeScreen,
                "ok": self.eventSelected,
                "timerAdd": self.timerAdd,
                "yellow": self.yellowButtonPressed,
                "blue": self.blueButtonPressed,
                "info": self.infoKeyPressed,
                "menu": self.furtherOptions,
                "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
                "preview": self.eventPreview,
            })

        self['colouractions'] = HelpableActionMap(
            self, 'ColorActions',
            {"red": (self.GoToTmbd, _("Search event in TMBD"))})

        self.isTMBD = fileExists(
            resolveFilename(SCOPE_PLUGINS, "Extensions/TMBD/plugin.pyo"))
        if self.isTMBD:
            self["key_red"] = Button(_("Search TMBD"))
            self.select = True
        if not self.isTMBD:
            self["key_red"] = Button(_("TMBD Not Installed"))
            self.select = False
        try:
            from Plugins.Extensions.YTTrailer.plugin import baseEPGSelection__init__
            description = _("Search yt-trailer for event")
        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
                    })
        self["actions"].csel = self
        if parent and hasattr(parent, "fallbackTimer"):
            self.fallbackTimer = parent.fallbackTimer
            self.onLayoutFinish.append(self.onCreate)
        else:
            self.fallbackTimer = FallbackTimerList(self, self.onCreate)
Exemple #19
0
 def __init__(self,
              session,
              service,
              zapFunc=None,
              eventid=None,
              bouquetChangeCB=None,
              serviceChangeCB=None,
              parent=None):
     Screen.__init__(self, session)
     self.bouquetChangeCB = bouquetChangeCB
     self.serviceChangeCB = serviceChangeCB
     self.ask_time = -1
     self['key_red'] = Button('')
     self.closeRecursive = False
     self.saved_title = None
     self['Service'] = ServiceEvent()
     self['Event'] = Event()
     self.session = session
     if isinstance(service, str) and eventid != None:
         self.type = EPG_TYPE_SIMILAR
         self.setTitle(_('Similar EPG'))
         self['key_yellow'] = Button()
         self['key_blue'] = Button()
         self['key_red'] = Button()
         self.currentService = service
         self.eventid = eventid
         self.zapFunc = None
     elif isinstance(service, eServiceReference) or isinstance(
             service, str):
         self.setTitle(_('Single EPG'))
         self.type = EPG_TYPE_SINGLE
         self['key_yellow'] = Button()
         self['key_blue'] = Button(_('Select Channel'))
         self.currentService = ServiceReference(service)
         self.zapFunc = zapFunc
         self.sort_type = 0
         self.setSortDescription()
     else:
         self.setTitle(_('Multi EPG'))
         self.skinName = 'EPGSelectionMulti'
         self.type = EPG_TYPE_MULTI
         self['key_yellow'] = Button(
             pgettext("button label, 'previous screen'", 'Prev'))
         self['key_blue'] = Button(
             pgettext("button label, 'next screen'", 'Next'))
         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.services = service
         self.zapFunc = zapFunc
     self.parent = parent
     self['key_green'] = Button(_('Add timer'))
     self.key_green_choice = self.ADD_TIMER
     self.key_red_choice = self.EMPTY
     self['list'] = EPGList(type=self.type,
                            selChangedCB=self.onSelectionChanged,
                            timer=session.nav.RecordTimer)
     self['actions'] = ActionMap(
         ['EPGSelectActions', 'OkCancelActions'], {
             'cancel': self.closeScreen,
             'ok': self.eventSelected,
             'timerAdd': self.timerAdd,
             'yellow': self.yellowButtonPressed,
             'blue': self.blueButtonPressed,
             'info': self.infoKeyPressed,
             'red': self.zapTo,
             'menu': self.furtherOptions,
             'nextBouquet': self.nextBouquet,
             'prevBouquet': self.prevBouquet,
             'nextService': self.nextService,
             'prevService': self.prevService,
             'preview': self.eventPreview
         })
     self['actions'].csel = self
     self.onLayoutFinish.append(self.onCreate)
Exemple #20
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
                    })
Exemple #21
0
    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)
    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},
                )
Exemple #23
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
                    })
Exemple #24
0
	def __init__(self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None, isEPGBar=None, switchBouquet=None, EPGNumberZap=None, togglePiP = None):
		Screen.__init__(self, session)
		self.screentitle = _("EPG Selection")
		self.bouquetChangeCB = bouquetChangeCB
		self.serviceChangeCB = serviceChangeCB
		self.switchBouquet = switchBouquet
		self.EPGNumberZap = EPGNumberZap
		self.togglePiP = None
		self.ask_time = -1 #now
		self["key_red"] = Button("")
		self.closeRecursive = False
		self.saved_title = None
		self["Service"] = ServiceEvent()
		self["Event"] = Event()
		if isinstance(service, str) and eventid != None:
			self.type = EPG_TYPE_SIMILAR
			self["key_yellow"] = Button()
			self["key_blue"] = Button()
			self["key_red"] = Button()
			self.currentService=service
			self.eventid = eventid
			self.zapFunc = None
		elif isEPGBar and (isinstance(service, eServiceReference) or isinstance(service, str)):
			self.skinName = ["EPGSelectionEPGBar_SD"]
			if session.desktop.size().width() > 720:
				self.skinName = ["EPGSelectionEPGBar_HD"]
			self.type = EPG_TYPE_EPGBAR
			self["key_yellow"] = Button()
			self["key_blue"] = Button()
			self.currentService=ServiceReference(service)
			self.zapFunc = zapFunc
			self.togglePiP = togglePiP
			self.sort_type = 0
			self.setSortDescription()
			
			self["EPGBarActions"] = ActionMap(["DirectionActions", "OkCancelActions", "InfobarSeekActions"],
			{
				"cancel": self.closeScreen,
				"ok": self.zapTo,
				"left": self.prevService,
				"right": self.nextService,
				"playpauseService": self.setPiPService,
			},-1)
			
			self["EPGBarActions"].csel = self
			
		elif isinstance(service, eServiceReference) or isinstance(service, str):
			self.type = EPG_TYPE_SINGLE
			self["key_yellow"] = Button()
			self["key_blue"] = Button()
			self.currentService=ServiceReference(service)
			self.zapFunc = zapFunc
			self.sort_type = 0
			self.setSortDescription()
		else:
			self.skinName = "EPGSelectionMulti"
			self.type = EPG_TYPE_MULTI
			self["key_yellow"] = Button(_("Prev"))
			self["key_blue"] = Button(_("Next"))
			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.services = service
			self.zapFunc = zapFunc

		self["key_green"] = Button(_("Add timer"))
		self.key_green_choice = self.ADD_TIMER
		self.key_red_choice = self.EMPTY
		self["list"] = EPGList(type = self.type, selChangedCB = self.onSelectionChanged, timer = session.nav.RecordTimer)

		self["actions"] = ActionMap(["EPGSelectActions", "OkCancelActions"],
			{
				"cancel": self.closeScreen,
				"ok": self.eventSelected,
				"timerAdd": self.timerAdd,
				"timerEnableDisable": self.timerEnableDisable,
				"instantToggleTimerState" : self.instantToggleTimerState,
				"instantTimer": self.addInstantTimer,
				"yellow": self.yellowButtonPressed,
				"blue": self.blueButtonPressed,
				"info": self.infoKeyPressed,
				"red": self.zapTo,
				"input_date_time": self.enterDateTime,
				"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
		
		if EPGNumberZap:
			self["EPGBarNumberActions"] = NumberActionMap( [ "NumberActions"],
			{
				"1": self.keyNumberGlobal,
				"2": self.keyNumberGlobal,
				"3": self.keyNumberGlobal,
				"4": self.keyNumberGlobal,
				"5": self.keyNumberGlobal,
				"6": self.keyNumberGlobal,
				"7": self.keyNumberGlobal,
				"8": self.keyNumberGlobal,
				"9": self.keyNumberGlobal,
			})
		
		self.onLayoutFinish.append(self.onCreate)
Exemple #25
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
				})