def __init__(self, session): from Components.Sources.StaticText import StaticText if (getDesktop(0).size().width() < 800): skin = "%s/skins/downloader_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) Screen.setTitle(self, _("CrossEPG")) self.onChangedEntry = [ ] self.sources = [] self.session = session self.mirrors = [] self["background"] = Pixmap() self["action"] = Label(_("Updating rytec providers...")) self["summary_action"] = StaticText(_("Updating rytec providers...")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self.config = CrossEPG_Config() self.config.load() self.timer = eTimer() self.timer.callback.append(self.start) self.onFirstExecBegin.append(self.firstExec)
def start(self): if self.load(): self.save(self.config.home_directory + "/providers/") self.session.open(MessageBox, _("%d providers updated") % len(self.sources), type = MessageBox.TYPE_INFO, timeout = 5) else: self.session.open(MessageBox, _("Cannot retrieve rytec sources"), type = MessageBox.TYPE_ERROR, timeout = 10) self.close()
def __init__(self, session): from Components.Sources.StaticText import StaticText if (getDesktop(0).size().width() < 800): skin = "%s/skins/downloader_sd.xml" % os.path.dirname( sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname( sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) Screen.__init__(self, session) Screen.setTitle(self, _("CrossEPG")) self.sources = [] self.session = session self["background"] = Pixmap() self["action"] = Label(_("Updating xepgdb providers...")) self["summary_action"] = StaticText(_("Updating rytec providers...")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self.config = CrossEPG_Config() self.config.load() self.timer = eTimer() self.timer.callback.append(self.start) self.onFirstExecBegin.append(self.firstExec)
def __init__(self, session): if (getDesktop(0).size().width() < 800): skin = "%s/skins/providers_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) else: skin = "%s/skins/providers_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.setup_title = _("CrossEPG") + " - " + _("Providers start order") Screen.setTitle(self, self.setup_title) self.config = CrossEPG_Config() self.config.load() self.providers = self.config.getAllProviders() self.onChangedEntry = [ ] self.list = [] self["list"] = List(self.list) self["list"].onSelectionChanged.append(self.selectionChanged) self["key_red"] = Button(_("Back")) self["key_green"] = Button("") self["key_yellow"] = Button("") self["key_blue"] = Button("") self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"], { "red": self.quit, "cancel": self.quit, "green": self.moveUp, "yellow": self.moveDown, "menu": self.quit, }, -2) self.buildList() self.onFirstExecBegin.append(self.selectionChanged)
def getCurrentValue(self): try: if self["list"].getCurrent()[1]: return _("Enabled") else: return _("Disabled") except: return ""
def start(self): self.loadSourceList() if self.load(): self.save(self.config.home_directory + "/providers/") self.session.open(MessageBox, _("%d providers updated") % len(self.sources), type = MessageBox.TYPE_INFO, timeout = 5) else: self.session.open(MessageBox, _("Cannot retrieve rytec sources"), type = MessageBox.TYPE_ERROR, timeout = 10) self.close()
def __init__(self, session, pcallback=None, noosd=False): self.session = session if (getDesktop(0).size().width() < 800): skin = "%s/skins/downloader_sd.xml" % os.path.dirname( sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname( sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.skinName = "downloader" Screen.setTitle(self, _("CrossEPG")) self["background"] = Pixmap() self["action"] = Label(_("Starting importer")) self["summary_action"] = StaticText(_("Starting importer")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self["progress_text"] = Progress() self["actions"] = NumberActionMap(["WizardActions", "InputActions"], {"back": self.quit}, -1) self.retValue = True self.config = CrossEPG_Config() self.config.load() self.lamedb = self.config.lamedb if getImageDistro() != "openvix": self.db_root = self.config.db_root else: self.db_root = config.misc.epgcachepath.value + 'crossepg' if not pathExists(self.db_root): if not createDir(self.db_root): self.db_root = "/hdd/crossepg" self.pcallback = pcallback self.wrapper = CrossEPG_Wrapper() self.wrapper.addCallback(self.wrapperCallback) self.hideprogress = eTimer() self.hideprogress.callback.append(self["progress"].hide) self.pcallbacktimer = eTimer() self.pcallbacktimer.callback.append(self.doCallback) self.status = 0 if noosd: self.wrappertimer = eTimer() self.wrappertimer.callback.append(self.startWrapper) self.wrappertimer.start(100, 1) else: self.onFirstExecBegin.append(self.firstExec)
def __init__(self, session, providers, pcallback = None, noosd = False): from Components.Sources.StaticText import StaticText from Components.Sources.Progress import Progress if (getDesktop(0).size().width() < 800): skin = "%s/skins/downloader_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.session = session self["background"] = Pixmap() self["action"] = Label(_("Starting downloader")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self["summary_action"] = StaticText(_("Starting downloader")) self["summary_status"] = StaticText() self["summary_progress"] = Progress() self["actions"] = NumberActionMap(["WizardActions", "InputActions"], { "back": self.quit }, -1) self.frontend = None self.rawchannel = None self.retValue = True self.provider_index = 0 self.status = 0 self.open = False self.saved = False self.oldService = None self.config = CrossEPG_Config() self.config.load() self.providers = providers self.pcallback = pcallback self.wrapper = CrossEPG_Wrapper() self.wrapper.addCallback(self.wrapperCallback) self.hideprogress = eTimer() self.hideprogress.callback.append(self["progress"].hide) self.pcallbacktimer = eTimer() self.pcallbacktimer.callback.append(self.doCallback) self.wrappertimer = eTimer() self.wrappertimer.callback.append(self.initWrapper) if noosd: self.wrappertimer.start(100, 1) else: self.onFirstExecBegin.append(self.firstExec)
def __init__(self, session, providers, pcallback=None, noosd=False): from Components.Sources.StaticText import StaticText from Components.Sources.Progress import Progress if (getDesktop(0).size().width() < 800): skin = "%s/skins/downloader_sd.xml" % os.path.dirname( sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname( sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.session = session self["background"] = Pixmap() self["action"] = Label(_("Starting downloader")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self["summary_action"] = StaticText(_("Starting downloader")) self["summary_status"] = StaticText() self["summary_progress"] = Progress() self["actions"] = NumberActionMap(["WizardActions", "InputActions"], {"back": self.quit}, -1) self.frontend = None self.rawchannel = None self.retValue = True self.provider_index = 0 self.status = 0 self.open = False self.saved = False self.oldService = None self.config = CrossEPG_Config() self.config.load() self.providers = providers self.pcallback = pcallback self.wrapper = CrossEPG_Wrapper() self.wrapper.addCallback(self.wrapperCallback) self.hideprogress = eTimer() self.hideprogress.callback.append(self["progress"].hide) self.pcallbacktimer = eTimer() self.pcallbacktimer.callback.append(self.doCallback) self.wrappertimer = eTimer() self.wrappertimer.callback.append(self.initWrapper) if noosd: self.wrappertimer.start(100, 1) else: self.onFirstExecBegin.append(self.firstExec)
def __init__(self, session, pcallback = None, noosd = False): self.session = session if (getDesktop(0).size().width() < 800): skin = "%s/skins/downloader_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.skinName = "downloader" Screen.setTitle(self, _("CrossEPG")) self["background"] = Pixmap() self["action"] = Label(_("Defragmentation...")) self["summary_action"] = StaticText(_("Defragmentation...")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self["progress_text"] = Progress() self["actions"] = NumberActionMap(["WizardActions", "InputActions"], { "back": self.quit }, -1) self.status = 0 self.retValue = True self.config = CrossEPG_Config() self.config.load() self.lamedb = self.config.lamedb if getImageDistro() not in ("openatv", "openMips", "egami", "miraclebox"): self.db_root = self.config.db_root else: self.db_root = config.misc.epgcachepath.value + 'crossepg' if not pathExists(self.db_root): if not createDir(self.db_root): self.db_root = "/hdd/crossepg" self.pcallback = pcallback self.wrapper = CrossEPG_Wrapper() self.wrapper.addCallback(self.wrapperCallback) self.hideprogress = eTimer() self.hideprogress.callback.append(self["progress"].hide) self.pcallbacktimer = eTimer() self.pcallbacktimer.callback.append(self.doCallback) if noosd: self.wrappertimer = eTimer() self.wrappertimer.callback.append(self.startWrapper) self.wrappertimer.start(100, 1) else: self.onFirstExecBegin.append(self.firstExec)
def selectionChanged(self): if len(self.list) == 0: return index = self["list"].getIndex() provider = self.list[index][2] if self.config.providers.count(provider) > 0: self["key_green"].setText(_("Disable")) else: self["key_green"].setText(_("Enable"))
def __init__(self, session): self.session = session if (getDesktop(0).size().width() < 800): skin = "%s/skins/about_sd.xml" % (os.path.dirname(sys.modules[__name__].__file__)) else: skin = "%s/skins/about_hd.xml" % (os.path.dirname(sys.modules[__name__].__file__)) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) Screen.setTitle(self, _("CrossEPG") + " - " + _("About")) self.config = CrossEPG_Config() self.config.load() self["about"] = Label("") self["rytec_pix"] = Pixmap() self["rytec_text"] = Label("") self["krkadoni_pix"] = Pixmap() self["krkadoni_text"] = Label("") self["actions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"], { "red": self.quit, "cancel": self.quit, "menu": self.quit, }, -2) self["key_red"] = Button(_("Close")) self["key_green"] = Button("") self["key_yellow"] = Button("") self["key_blue"] = Button("") try: from version import version except Exception as e: version = "unknow version" credit = "CrossEPG %s (c) 2009-2013 Sandro Cavazzoni\n" % version credit += "https://github.com/OpenVisionE2/CrossEPG\n\n" credit += "Application credits:\n" credit += "- Sandro Cavazzoni aka skaman (main developer)\n" credit += "- Andy Blackburn aka andyblac (co-developer)\n" credit += "- Ambrosa (scripts developer)\n" credit += "- u Killer Bestia (server side application maintainer)\n" credit += "- Persian Prince (contributor)\n" credit += "Sources credits:\n" credit += "- Rytec http://www.rytec.be (xmltv providers for many countries)\n" credit += "- Krkadoni http://www.krkadoni.com/ (xmltv provider for Ex Yugoslavia)\n" credit += "- Bodyan and dillinger http://linux-sat.tv/ (xmltv provider for ex USSR channels)\n" credit += "- Devilcosta http://sgcpm.com/ (xmltv provider for nova channels in greek and english)" self["about"].setText(credit) self.onFirstExecBegin.append(self.setImages)
def __init__(self, session, protocol): if (getDesktop(0).size().width() < 800): skin = "%s/skins/providers_sd.xml" % os.path.dirname( sys.modules[__name__].__file__) else: skin = "%s/skins/providers_hd.xml" % os.path.dirname( sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) if protocol == "xmltv": protocol_title = _("XMLTV") elif protocol == "opentv": protocol_title = _("OpenTV") from Components.NimManager import nimmanager self.configured_sats = nimmanager.getConfiguredSats() elif protocol == "xepgdb": protocol_title = _("XEPGDB") elif protocol == "script": protocol_title = _("Scripts") elif protocol == "mhw2": protocol_title = _("MHW2") self.setup_title = _("CrossEPG") + " - " + protocol_title + ' ' + _( "providers") Screen.setTitle(self, self.setup_title) self.patchtype = getEPGPatchType() self.config = CrossEPG_Config() self.config.load() self.providers = self.config.getAllProviders() self.protocol = protocol self.has_chnaged = False self.old_service = None self.onChangedEntry = [] self.list = [] self["list"] = List(self.list) self["list"].onSelectionChanged.append(self.selectionChanged) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("Save")) self["key_yellow"] = Button(_("Download")) self["key_blue"] = Button("") self["setupActions"] = ActionMap( ["SetupActions", "ColorActions", "MenuActions"], { "red": self.keyCancel, "cancel": self.keyCancel, "green": self.keySave, "ok": self.switchState, "yellow": self.download, "menu": self.keyCancel, }, -2) self.buildList()
def wrapperCallback(self, event, param): if event == CrossEPG_Wrapper.EVENT_READY: self.wrapper.importx() elif event == CrossEPG_Wrapper.EVENT_END: if self.status == 0: self.status += 1 self.wrapper.save() else: self.wrapper.delCallback(self.wrapperCallback) self.wrapper.quit() self.closeAndCallback(self.retValue) elif event == CrossEPG_Wrapper.EVENT_FILE: self["action"].text = _("Parsing") self["status"].text = param elif event == CrossEPG_Wrapper.EVENT_URL: self["action"].text = _("Downloading") self["status"].text = param elif event == CrossEPG_Wrapper.EVENT_ACTION: self["action"].text = param elif event == CrossEPG_Wrapper.EVENT_STATUS: self["status"].text = param elif event == CrossEPG_Wrapper.EVENT_PROGRESS: self["progress"].setValue(param) self["progress_text"].setValue(param) elif event == CrossEPG_Wrapper.EVENT_PROGRESSONOFF: if param: self.hideprogress.stop() self["progress"].setValue(0) self["progress"].show() self["progress_text"].setValue(0) else: self["progress"].setValue(100) self["progress_text"].setValue(100) self.hideprogress.start(500, 1) elif event == CrossEPG_Wrapper.EVENT_QUIT: self.closeAndCallback(self.retValue) elif event == CrossEPG_Wrapper.EVENT_ERROR: self.session.open(MessageBox, _("CrossEPG error: %s") % (param), type=MessageBox.TYPE_INFO, timeout=20) self.retValue = False self.quit()
def __init__(self, session, protocol): if (getDesktop(0).size().width() < 800): skin = "%s/skins/providers_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) else: skin = "%s/skins/providers_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) if protocol == "xmltv": protocol_title = _("XMLTV") elif protocol == "opentv": protocol_title = _("OpenTV") from Components.NimManager import nimmanager self.configured_sats = nimmanager.getConfiguredSats() elif protocol == "xepgdb": protocol_title = _("XEPGDB") elif protocol == "script": protocol_title = _("Scripts") elif protocol == "mhw2": protocol_title = _("MHW2") self.setup_title = _("CrossEPG") + " - " + protocol_title + ' ' + _("providers") Screen.setTitle(self, self.setup_title) self.patchtype = getEPGPatchType() self.config = CrossEPG_Config() self.config.load() self.providers = self.config.getAllProviders() self.protocol = protocol self.has_chnaged = False self.old_service = None self.onChangedEntry = [ ] self.list = [] self["list"] = List(self.list) self["list"].onSelectionChanged.append(self.selectionChanged) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("Save")) self["key_yellow"] = Button(_("Download")) self["key_blue"] = Button("") self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"], { "red": self.keyCancel, "cancel": self.keyCancel, "green": self.keySave, "ok": self.switchState, "yellow": self.download, "menu": self.keyCancel, }, -2) self.buildList()
def firstRun(self): if len(self.list) <= 1: return index = self["list"].getIndex() if index == 0: self["key_yellow"].setText("") self["key_blue"].setText(_("Move down")) elif index == len(self.list) - 1: self["key_yellow"].setText(_("Move up")) self["key_blue"].setText("") else: self["key_yellow"].setText(_("Move up")) self["key_blue"].setText(_("Move down"))
def selectionChanged(self): if len(self.list) <= 1: return index = self["list"].getIndex() if index == 0: self["key_green"].setText("") self["key_yellow"].setText(_("Move down")) elif index == len(self.list) - 1: self["key_green"].setText(_("Move up")) self["key_yellow"].setText("") else: self["key_green"].setText(_("Move up")) self["key_yellow"].setText(_("Move down"))
def selectionChanged(self): if len(self.list) <= 1: return self.has_chnaged = True index = self["list"].getIndex() if index == 0: self["key_yellow"].setText("") self["key_blue"].setText(_("Move down")) elif index == len(self.list) - 1: self["key_yellow"].setText(_("Move up")) self["key_blue"].setText("") else: self["key_yellow"].setText(_("Move up")) self["key_blue"].setText(_("Move down"))
def __init__(self, session): self.session = session if (getDesktop(0).size().width() < 800): skin = "%s/skins/info_sd.xml" % (os.path.dirname( sys.modules[__name__].__file__)) else: skin = "%s/skins/info_hd.xml" % (os.path.dirname( sys.modules[__name__].__file__)) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) Screen.setTitle(self, _("CrossEPG") + " - " + _("Info")) self.config = CrossEPG_Config() self.config.load() self["version"] = Label("") self["create"] = Label("") self["last_update"] = Label("") self["headersdb_size"] = Label("") self["descriptorsdb_size"] = Label("") self["indexesdb_size"] = Label("") self["aliasesdb_size"] = Label("") self["total_size"] = Label("") self["channels_count"] = Label("") self["events_count"] = Label("") self["hashes_count"] = Label("") self["actions"] = ActionMap( ["SetupActions", "ColorActions", "MenuActions"], { "red": self.quit, "cancel": self.quit, "menu": self.quit, }, -2) self["key_red"] = Button(_("Close")) self["key_green"] = Button("") self["key_yellow"] = Button("") self["key_blue"] = Button("") self.wrapper = CrossEPG_Wrapper() self.wrapper.addCallback(self.__wrapperCallback) if getImageDistro() == 'openvix': self.wrapper.init(CrossEPG_Wrapper.CMD_INFO, config.misc.epgcachepath.value + 'crossepg') else: self.wrapper.init(CrossEPG_Wrapper.CMD_INFO, self.config.db_root)
def __init__(self, session, parent): Screen.__init__(self, session, parent = parent) self["SetupTitle"] = StaticText(_(parent.setup_title)) self["SetupEntry"] = StaticText("") self["SetupValue"] = StaticText("") self.onShow.append(self.addWatcher) self.onHide.append(self.removeWatcher)
def __init__(self, session): if (getDesktop(0).size().width() < 800): skin = "%s/skins/providers_sd.xml" % os.path.dirname( sys.modules[__name__].__file__) else: skin = "%s/skins/providers_hd.xml" % os.path.dirname( sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.config = CrossEPG_Config() self.config.load() self.providers = self.config.getAllProviders() self.list = [] self["list"] = List(self.list) self["list"].onSelectionChanged.append(self.selectionChanged) self["key_red"] = Button(_("Back")) self["key_green"] = Button("") self["key_yellow"] = Button("") self["key_blue"] = Button("") self["setupActions"] = ActionMap( ["SetupActions", "ColorActions"], { "red": self.quit, "cancel": self.quit, "green": self.moveUp, "yellow": self.moveDown, }, -2) self.buildList() self.onFirstExecBegin.append(self.setCustomTitle) self.onFirstExecBegin.append(self.selectionChanged)
def __init__(self, session): self.session = session if getDesktop(0).size().width() < 800: skin = "%s/skins/about_sd.xml" % (os.path.dirname(sys.modules[__name__].__file__)) else: skin = "%s/skins/about_hd.xml" % (os.path.dirname(sys.modules[__name__].__file__)) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.config = CrossEPG_Config() self.config.load() self["about"] = Label("") self["rytec_pix"] = Pixmap() self["rytec_text"] = Label("") self["krkadoni_pix"] = Pixmap() self["krkadoni_text"] = Label("") self["actions"] = ActionMap(["SetupActions", "ColorActions"], {"red": self.quit, "cancel": self.quit}, -2) self["key_red"] = Button(_("Back")) self["key_green"] = Button("") self["key_yellow"] = Button("") self["key_blue"] = Button("") try: from version import version except Exception, e: version = "unknow version"
def __init__(self, session): if (getDesktop(0).size().width() < 800): skin = "%s/skins/menu_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) else: skin = "%s/skins/menu_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) try: from version import version self.setup_title = _("CrossEPG") + " - " + version[:5] Screen.setTitle(self, self.setup_title) except Exception, e: self.setup_title = _("CrossEPG") + " - " + _("unknown version") Screen.setTitle(self, self.setup_title)
def keyCancel(self): if self.has_chnaged: self.session.openWithCallback( self.cancelConfirm, MessageBox, _("Really close without saving settings?")) else: self.close()
def doCrossEPG(self, answer): global retrycount now = int(time()) if answer is False: if retrycount < 2: print '[CrossEPG_Auto] Number of retries', retrycount print "[CrossEPG_Auto] delayed." repeat = retrycount repeat += 1 retrycount = repeat CrossEPGTime = now + (30 * 60) print "[CrossEPG_Auto] Time now set to", strftime( "%c", localtime(CrossEPGTime)), strftime("(now=%c)", localtime(now)) self.crossepgtimer.startLongTimer(30 * 60) else: atLeast = 60 print "[CrossEPG_Auto] Enough Retries, delaying till next schedule.", strftime( "%c", localtime(now)) self.session.open( MessageBox, _("Enough Retries, delaying till next schedule."), MessageBox.TYPE_INFO, timeout=10) retrycount = 0 self.crossepgdate(atLeast) else: self.timer = eTimer() self.timer.callback.append(self.doautostartdownload) print "[CrossEPG_Auto] Running CrossEPG", strftime( "%c", localtime(now)) self.timer.start(100, 1)
def CrossEPGonTimer(self): self.crossepgtimer.stop() now = int(time()) wake = self.getCrossEPGTime() # If we're close enough, we're okay... atLeast = 0 if wake - now < 60: atLeast = 60 print "[CrossEPG_Auto] onTimer occured at", strftime( "%c", localtime(now)) from Screens.Standby import inStandby self.config.load() if (self.config.download_standby_enabled and inStandby) or self.config.download_daily_enabled: if self.lock or self.session.nav.RecordTimer.isRecording( ) or abs(self.session.nav.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs( self.session.nav.RecordTimer.getNextZapTime() - time()) <= 900: print "[CrossEPG_Auto] poll delaying as recording." self.doCrossEPG(False) elif not inStandby: message = _( "Your epg about to update,\nDo you want to allow this?" ) ybox = self.session.openWithCallback(self.doCrossEPG, MessageBox, message, MessageBox.TYPE_YESNO, timeout=30) ybox.setTitle('Scheduled CrossEPG.') else: self.doCrossEPG(True) self.crossepgdate(atLeast)
def keyCancel(self): if self["config"].isChanged(): self.session.openWithCallback( self.cancelConfirm, MessageBox, _("Really close without saving settings?")) else: self.close()
def __init__(self, session): if getDesktop(0).size().width() < 800: skin = "%s/skins/downloader_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.sources = [] self.session = session self["background"] = Pixmap() self["action"] = Label(_("Updating xepgdb providers...")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self.config = CrossEPG_Config() self.config.load() self.timer = eTimer() self.timer.callback.append(self.start) self.onFirstExecBegin.append(self.firstExec)
def __init__(self, session, parent): Screen.__init__(self, session, parent=parent) self["SetupTitle"] = StaticText(_(parent.setup_title)) self["SetupEntry"] = StaticText("") self["SetupValue"] = StaticText("") self.onShow.append(self.addWatcher) self.onHide.append(self.removeWatcher)
def wrapperCallback(self, event, param): if event == CrossEPG_Wrapper.EVENT_READY: self.download() elif event == CrossEPG_Wrapper.EVENT_END: if self.saved and self.open: self.wrapper.close() self.open = False if self.status == 0: self.provider_index += 1 if self.provider_index < len(self.providers): self.download() else: self.status = 1 if self.oldService: self.session.nav.playService(self.oldService) if self.open: self.wrapper.save() else: self.wrapper.quit() else: if self.open: self.wrapper.close() self.wrapper.quit() elif event == CrossEPG_Wrapper.EVENT_ACTION: self["action"].text = param self["status"].text = "" self["summary_action"].text = param self["summary_status"].text = "" elif event == CrossEPG_Wrapper.EVENT_STATUS or event == CrossEPG_Wrapper.EVENT_URL: self["status"].text = param self["summary_status"].text = param elif event == CrossEPG_Wrapper.EVENT_PROGRESS: self["progress"].setValue(param) self["summary_progress"].setValue(param) elif event == CrossEPG_Wrapper.EVENT_PROGRESSONOFF: if param: self.hideprogress.stop() self["progress"].setValue(0) self["progress"].show() self["summary_progress"].setValue(0) else: self["progress"].setValue(100) self["summary_progress"].setValue(100) self.hideprogress.start(500, 1) elif event == CrossEPG_Wrapper.EVENT_QUIT: self.closeAndCallback(self.retValue) elif event == CrossEPG_Wrapper.EVENT_ERROR: self.session.open(MessageBox, _("CrossEPG error: %s") % (param), type=MessageBox.TYPE_INFO, timeout=20) self.retValue = False self.quit()
def save(self): print "[CrossEPG_Wrapper] -> SAVE" self.__callCallbacks(self.EVENT_ACTION, _("Saving data")) self.__callCallbacks(self.EVENT_STATUS, "") if self.oldapi: self.cmd.write("SAVE\n", 5) else: self.cmd.write("SAVE\n")
def text(self): print "[CrossEPG_Wrapper] -> TEXT" self.__callCallbacks(self.EVENT_ACTION, _("Loading data")) self.__callCallbacks(self.EVENT_STATUS, "") if self.oldapi: self.cmd.write("TEXT\n", 5) else: self.cmd.write("TEXT\n")
def convert(self): print "[CrossEPG_Wrapper] -> CONVERT" self.__callCallbacks(self.EVENT_ACTION, _("Converting data")) self.__callCallbacks(self.EVENT_STATUS, "") if self.oldapi: self.cmd.write("CONVERT\n", 8) else: self.cmd.write("CONVERT\n")
def error(self, message): print "[CrossEPG_Downloader] Error: %s" % message self.session.open(MessageBox, _("CrossEPG error: %s") % (message), type=MessageBox.TYPE_INFO, timeout=20) self.retValue = False self.quit()
def __init__(self, session): self.session = session if (getDesktop(0).size().width() < 800): skin = "%s/skins/info_sd.xml" % (os.path.dirname(sys.modules[__name__].__file__)) else: skin = "%s/skins/info_hd.xml" % (os.path.dirname(sys.modules[__name__].__file__)) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) Screen.setTitle(self, _("CrossEPG") + " - " + _("Info")) self.config = CrossEPG_Config() self.config.load() self["version"] = Label("") self["create"] = Label("") self["last_update"] = Label("") self["headersdb_size"] = Label("") self["descriptorsdb_size"] = Label("") self["indexesdb_size"] = Label("") self["aliasesdb_size"] = Label("") self["total_size"] = Label("") self["channels_count"] = Label("") self["events_count"] = Label("") self["hashes_count"] = Label("") self["actions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"], { "red": self.quit, "cancel": self.quit, "menu": self.quit, }, -2) self["key_red"] = Button(_("Back")) self["key_green"] = Button("") self["key_yellow"] = Button("") self["key_blue"] = Button("") self.wrapper = CrossEPG_Wrapper() self.wrapper.addCallback(self.__wrapperCallback) if getDistro() == 'ViX': self.wrapper.init(CrossEPG_Wrapper.CMD_INFO, config.misc.epgcachepath.value + 'crossepg') else: self.wrapper.init(CrossEPG_Wrapper.CMD_INFO, self.config.db_root)
def wrapperCallback(self, event, param): if event == CrossEPG_Wrapper.EVENT_READY: self.download() elif event == CrossEPG_Wrapper.EVENT_END: if self.saved and self.open: self.wrapper.close() self.open = False if self.status == 0: self.provider_index += 1 if self.provider_index < len(self.providers): self.download() else: self.status = 1 if self.oldService: self.session.nav.playService(self.oldService) if self.open: self.wrapper.save() else: self.wrapper.quit() else: if self.open: self.wrapper.close() self.wrapper.quit() elif event == CrossEPG_Wrapper.EVENT_ACTION: self["action"].text = param self["status"].text = "" self["summary_action"].text = param self["summary_status"].text = "" elif event == CrossEPG_Wrapper.EVENT_STATUS or event == CrossEPG_Wrapper.EVENT_URL: self["status"].text = param self["summary_status"].text = param elif event == CrossEPG_Wrapper.EVENT_PROGRESS: self["progress"].setValue(param) self["summary_progress"].setValue(param) elif event == CrossEPG_Wrapper.EVENT_PROGRESSONOFF: if param: self.hideprogress.stop() self["progress"].setValue(0) self["progress"].show() self["summary_progress"].setValue(0) else: self["progress"].setValue(100) self["summary_progress"].setValue(100) self.hideprogress.start(500, 1) elif event == CrossEPG_Wrapper.EVENT_QUIT: self.closeAndCallback(self.retValue) elif event == CrossEPG_Wrapper.EVENT_ERROR: self.session.open(MessageBox, _("CrossEPG error: %s") % (param), type = MessageBox.TYPE_INFO, timeout = 20) self.retValue = False self.quit()
def __init__(self, session, providers, pcallback=None, noosd=False): if getDesktop(0).size().width() < 800: skin = "%s/skins/downloader_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.session = session self["background"] = Pixmap() self["action"] = Label(_("Starting downloader")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self["actions"] = NumberActionMap(["WizardActions", "InputActions"], {"back": self.quit}, -1) self.__event_tracker = ServiceEventTracker(screen=self, eventmap={iPlayableService.evTunedIn: self.tuned}) self.retValue = True self.provider_index = 0 self.status = 0 self.open = False self.saved = False self.tune_enabled = False self.oldService = self.session.nav.getCurrentlyPlayingServiceReference() self.config = CrossEPG_Config() self.config.load() self.providers = providers self.pcallback = pcallback self.wrapper = CrossEPG_Wrapper() self.wrapper.addCallback(self.wrapperCallback) self.timeout = eTimer() self.timeout.callback.append(self.quit) self.hideprogress = eTimer() self.hideprogress.callback.append(self["progress"].hide) self.pcallbacktimer = eTimer() self.pcallbacktimer.callback.append(self.doCallback) self.wrappertimer = eTimer() self.wrappertimer.callback.append(self.initWrapper) if noosd: self.wrappertimer.start(100, 1) else: self.onFirstExecBegin.append(self.firstExec)
def __init__(self, session): self.session = session if (getDesktop(0).size().width() < 800): skin = "%s/skins/about_sd.xml" % (os.path.dirname( sys.modules[__name__].__file__)) else: skin = "%s/skins/about_hd.xml" % (os.path.dirname( sys.modules[__name__].__file__)) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) Screen.setTitle(self, _("CrossEPG") + " - " + _("About")) self.config = CrossEPG_Config() self.config.load() self["about"] = Label("") self["rytec_pix"] = Pixmap() self["rytec_text"] = Label("") self["krkadoni_pix"] = Pixmap() self["krkadoni_text"] = Label("") self["actions"] = ActionMap( ["SetupActions", "ColorActions", "MenuActions"], { "red": self.quit, "cancel": self.quit, "menu": self.quit, }, -2) self["key_red"] = Button(_("Back")) self["key_green"] = Button("") self["key_yellow"] = Button("") self["key_blue"] = Button("") try: from version import version except Exception, e: version = "unknow version"
def __init__(self, session, protocol): if (getDesktop(0).size().width() < 800): skin = "%s/skins/providers_sd.xml" % os.path.dirname( sys.modules[__name__].__file__) else: skin = "%s/skins/providers_hd.xml" % os.path.dirname( sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.patchtype = getEPGPatchType() self.config = CrossEPG_Config() self.config.load() self.providers = self.config.getAllProviders() self.protocol = protocol self.old_service = None self.list = [] self["list"] = List(self.list) self["list"].onSelectionChanged.append(self.selectionChanged) self["key_red"] = Button(_("Back")) self["key_green"] = Button(_("Enable")) self["key_yellow"] = Button(_("Download")) self["key_blue"] = Button("") self["setupActions"] = ActionMap( ["SetupActions", "ColorActions"], { "red": self.quit, "cancel": self.quit, "green": self.switchState, "ok": self.switchState, "yellow": self.download, }, -2) self.buildList() self.onFirstExecBegin.append(self.setTitleByProtocol) self.onFirstExecBegin.append(self.selectionChanged)
def __init__(self, session): if (getDesktop(0).size().width() < 800): skin = "%s/skins/providers_sd.xml" % os.path.dirname( sys.modules[__name__].__file__) else: skin = "%s/skins/providers_hd.xml" % os.path.dirname( sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.setup_title = _("CrossEPG") + " - " + _("Providers start order") Screen.setTitle(self, self.setup_title) self.config = CrossEPG_Config() self.config.load() self.has_chnaged = False self.providers = self.config.getAllProviders() self.onChangedEntry = [] self.list = [] self["list"] = List(self.list) self["list"].onSelectionChanged.append(self.selectionChanged) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button("Save") self["key_yellow"] = Button("") self["key_blue"] = Button("") self["setupActions"] = ActionMap( ["SetupActions", "ColorActions", "MenuActions"], { "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keySave, "yellow": self.moveUp, "blue": self.moveDown, "menu": self.keyCancel, }, -2) self.buildList() self.onFirstExecBegin.append(self.firstRun)
def __init__(self, session, pcallback = None, noosd = False): self.session = session if (getDesktop(0).size().width() < 800): skin = "%s/skins/downloader_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 0 else: skin = "%s/skins/downloader_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) self.isHD = 1 f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self["background"] = Pixmap() self["action"] = Label(_("Starting importer")) self["status"] = Label("") self["progress"] = ProgressBar() self["progress"].hide() self["actions"] = NumberActionMap(["WizardActions", "InputActions"], { "back": self.quit }, -1) self.retValue = True self.config = CrossEPG_Config() self.config.load() self.lamedb = self.config.lamedb self.db_root = self.config.db_root if not pathExists(self.db_root): if not createDir(self.db_root): self.db_root = "/hdd/crossepg" self.pcallback = pcallback self.wrapper = CrossEPG_Wrapper() self.wrapper.addCallback(self.wrapperCallback) self.hideprogress = eTimer() self.hideprogress.callback.append(self["progress"].hide) self.pcallbacktimer = eTimer() self.pcallbacktimer.callback.append(self.doCallback) self.status = 0 if noosd: self.wrappertimer = eTimer() self.wrappertimer.callback.append(self.startWrapper) self.wrappertimer.start(100, 1) else: self.onFirstExecBegin.append(self.firstExec)
def __init__(self, session, protocol): if (getDesktop(0).size().width() < 800): skin = "%s/skins/providers_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) else: skin = "%s/skins/providers_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.patchtype = getEPGPatchType() self.config = CrossEPG_Config() self.config.load() self.providers = self.config.getAllProviders() self.protocol = protocol self.old_service = None self.list = [] self["list"] = List(self.list) self["list"].onSelectionChanged.append(self.selectionChanged) self["key_red"] = Button(_("Back")) self["key_green"] = Button(_("Enable")) self["key_yellow"] = Button(_("Download")) self["key_blue"] = Button("") self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], { "red": self.quit, "cancel": self.quit, "green": self.switchState, "ok": self.switchState, "yellow": self.download, }, -2) self.buildList() self.onFirstExecBegin.append(self.setTitleByProtocol) self.onFirstExecBegin.append(self.selectionChanged)
def wrapperCallback(self, event, param): if event == CrossEPG_Wrapper.EVENT_READY: #self.wrapper.epgdat("%s/ext.epg.dat" % (self.db_root)) #self.wrapper.lamedb("/etc/enigma2/%s" % (self.lamedb)) self.wrapper.defrag() elif event == CrossEPG_Wrapper.EVENT_END: if self.status == 0: self.wrapper.save() else: self.wrapper.delCallback(self.wrapperCallback) self.wrapper.quit() self.closeAndCallback(self.retValue) self.status += 1 elif event == CrossEPG_Wrapper.EVENT_ACTION: self["action"].text = param elif event == CrossEPG_Wrapper.EVENT_STATUS: self["status"].text = param elif event == CrossEPG_Wrapper.EVENT_PROGRESS: self["progress"].setValue(param) self["progress_text"].setValue(param) elif event == CrossEPG_Wrapper.EVENT_PROGRESSONOFF: if param: self.hideprogress.stop() self["progress"].setValue(0) self["progress"].show() self["progress_text"].setValue(0) else: self["progress"].setValue(100) self.hideprogress.start(500, 1) self["progress_text"].setValue(100) elif event == CrossEPG_Wrapper.EVENT_QUIT: self.closeAndCallback(self.retValue) elif event == CrossEPG_Wrapper.EVENT_ERROR: self.session.open(MessageBox, _("CrossEPG error: %s") % (param), type=MessageBox.TYPE_INFO, timeout=20) self.retValue = False self.quit()
def doneConfiguring(self): now = int(time()) if self.config.download_standby_enabled or self.config.download_daily_enabled: if autoCrossEPGTimer is not None: print "[CrossEPG_Auto] Schedule Enabled at", strftime("%c", localtime(now)) autoCrossEPGTimer.crossepgdate() else: if autoCrossEPGTimer is not None: global CrossEPGTime CrossEPGTime = 0 print "[CrossEPG_Auto] Schedule Disabled at", strftime("%c", localtime(now)) autoCrossEPGTimer.backupstop() if CrossEPGTime > 0: t = localtime(CrossEPGTime) crossepgtext = strftime(_("%a %e %b %-H:%M"), t) else: crossepgtext = ""
def wrapperCallback(self, event, param): if event == CrossEPG_Wrapper.EVENT_READY: #self.wrapper.epgdat("%s/ext.epg.dat" % (self.db_root)) #self.wrapper.lamedb("/etc/enigma2/%s" % (self.lamedb)) self.wrapper.defrag() elif event == CrossEPG_Wrapper.EVENT_END: if self.status == 0: self.wrapper.save() else: self.wrapper.delCallback(self.wrapperCallback) self.wrapper.quit() self.closeAndCallback(self.retValue) self.status += 1 elif event == CrossEPG_Wrapper.EVENT_ACTION: self["action"].text = param elif event == CrossEPG_Wrapper.EVENT_STATUS: self["status"].text = param elif event == CrossEPG_Wrapper.EVENT_PROGRESS: self["progress"].setValue(param) self["progress_text"].setValue(param) elif event == CrossEPG_Wrapper.EVENT_PROGRESSONOFF: if param: self.hideprogress.stop() self["progress"].setValue(0) self["progress"].show() self["progress_text"].setValue(0) else: self["progress"].setValue(100) self.hideprogress.start(500, 1) self["progress_text"].setValue(100) elif event == CrossEPG_Wrapper.EVENT_QUIT: self.closeAndCallback(self.retValue) elif event == CrossEPG_Wrapper.EVENT_ERROR: self.session.open(MessageBox, _("CrossEPG error: %s") % (param), type = MessageBox.TYPE_INFO, timeout = 20) self.retValue = False self.quit()
def doneConfiguring(self): now = int(time()) if self.config.download_standby_enabled or self.config.download_daily_enabled: if autoCrossEPGTimer is not None: print "[CrossEPG_Auto] Schedule Enabled at", strftime( "%c", localtime(now)) autoCrossEPGTimer.crossepgdate() else: if autoCrossEPGTimer is not None: global CrossEPGTime CrossEPGTime = 0 print "[CrossEPG_Auto] Schedule Disabled at", strftime( "%c", localtime(now)) autoCrossEPGTimer.backupstop() if CrossEPGTime > 0: t = localtime(CrossEPGTime) crossepgtext = strftime(_("%a %e %b %-H:%M"), t) else: crossepgtext = ""
def Plugins(**kwargs): config = CrossEPG_Config() config.load() plugins = list() if config.show_plugin == 1 and config.show_extension == 1: plugins.append(PluginDescriptor(name="CrossEPG Downloader", description=_("An EPG downloader"), where = [ PluginDescriptor.WHERE_EXTENSIONSMENU, PluginDescriptor.WHERE_PLUGINMENU ], fnc = call_downloader)) elif config.show_extension == 1: plugins.append(PluginDescriptor(name="CrossEPG Downloader", description=_("An EPG downloader"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = call_downloader)) elif config.show_plugin == 1: plugins.append(PluginDescriptor(name="CrossEPG Downloader", description=_("An EPG downloader"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc = call_downloader)) if config.isQBOXHD(): plugins.append(PluginDescriptor(name="CrossEPG", description=_("CrossEPG setup panel"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc = call_setup)) else: plugins.append(PluginDescriptor(name="CrossEPG", description=_("CrossEPG setup panel"), where = PluginDescriptor.WHERE_MENU, fnc = setup)) plugins.append(PluginDescriptor(name="CrossEPG Auto", description = _("CrossEPG automatic actions"), where = PluginDescriptor.WHERE_SESSIONSTART, fnc = call_autostart)) if config.show_force_reload_as_plugin == 1: plugins.append(PluginDescriptor(name="CrossEPG Force Reload", description=_("CrossEPG Force Reload"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc = call_loaderAsPlugin)) return plugins;
def CrossEPGonTimer(self): self.crossepgtimer.stop() now = int(time()) wake = self.getCrossEPGTime() # If we're close enough, we're okay... atLeast = 0 if wake - now < 60: atLeast = 60 print "[CrossEPG_Auto] onTimer occured at", strftime("%c", localtime(now)) from Screens.Standby import inStandby self.config.load() if (self.config.download_standby_enabled and inStandby) or self.config.download_daily_enabled: if self.lock or self.session.nav.RecordTimer.isRecording() or abs(self.session.nav.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs(self.session.nav.RecordTimer.getNextZapTime() - time()) <= 900: print "[CrossEPG_Auto] poll delaying as recording." self.doCrossEPG(False) elif not inStandby: message = _("Your epg about to update,\nDo you want to allow this?") ybox = self.session.openWithCallback(self.doCrossEPG, MessageBox, message, MessageBox.TYPE_YESNO, timeout = 30) ybox.setTitle('Scheduled CrossEPG.') else: self.doCrossEPG(True) self.crossepgdate(atLeast)
def doCrossEPG(self, answer): global retrycount now = int(time()) if answer is False: if retrycount < 2: print '[CrossEPG_Auto] Number of retries',retrycount print "[CrossEPG_Auto] delayed." repeat = retrycount repeat += 1 retrycount = repeat CrossEPGTime = now + (30 * 60) print "[CrossEPG_Auto] Time now set to", strftime("%c", localtime(CrossEPGTime)), strftime("(now=%c)", localtime(now)) self.crossepgtimer.startLongTimer(30 * 60) else: atLeast = 60 print "[CrossEPG_Auto] Enough Retries, delaying till next schedule.", strftime("%c", localtime(now)) self.session.open(MessageBox, _("Enough Retries, delaying till next schedule."), MessageBox.TYPE_INFO, timeout = 10) retrycount = 0 self.crossepgdate(atLeast) else: self.timer = eTimer() self.timer.callback.append(self.doautostartdownload) print "[CrossEPG_Auto] Running CrossEPG", strftime("%c", localtime(now)) self.timer.start(100, 1)
def __init__(self, session): if (getDesktop(0).size().width() < 800): skin = "%s/skins/menu_sd.xml" % os.path.dirname(sys.modules[__name__].__file__) else: skin = "%s/skins/menu_hd.xml" % os.path.dirname(sys.modules[__name__].__file__) f = open(skin, "r") self.skin = f.read() f.close() Screen.__init__(self, session) self.config = CrossEPG_Config() self.config.load() self.patchtype = getEPGPatchType() self.openTVMenuOn = True # [iq] l = [] l.append(self.buildListEntry(_("Configure"), "configure.png")) l.append(self.buildListEntry(_("XMLTV providers"), "xmltv.png")) if self.openTVMenuOn: # [iq] l.append(self.buildListEntry(_("OpenTV providers"), "opentv.png")) l.append(self.buildListEntry(_("XEPGDB providers"), "xepgdb.png")) l.append(self.buildListEntry(_("Scripts providers"), "scripts.png")) l.append(self.buildListEntry(_("MHW2 providers"), "opentv.png")) l.append(self.buildListEntry(_("Providers start order"), "reorder.png")) l.append(self.buildListEntry(_("Update rytec providers"), "rytec_small.png")) l.append(self.buildListEntry(_("Update xepgdb providers"), "xepgdb.png")) l.append(self.buildListEntry(_("Download now"), "download.png")) l.append(self.buildListEntry(_("Force csv import now"), "csv.png")) l.append(self.buildListEntry(_("Force epg.dat conversion now"), "conversion.png")) l.append(self.buildListEntry(_("Force epg reload"), "reload.png")) l.append(self.buildListEntry(_("Info about database"), "dbinfo.png")) l.append(self.buildListEntry(_("About"), "about.png")) self["list"] = List(l) self["setupActions"] = ActionMap(["SetupActions"], { "cancel": self.quit, "ok": self.openSelected, }, -2) self.onFirstExecBegin.append(self.setTitleWithVerion) if self.config.configured == 0: self.onFirstExecBegin.append(self.openSetup)