def refresh(self): settings = SettingsLoader() self.listTv = settings.readBouquetsTvList(ENIGMA2_SETTINGS_PWD) self.listRadio = settings.readBouquetsRadioList(ENIGMA2_SETTINGS_PWD) self.drawList = [] self.listAll = [] self.bouquets = config.sifteam.settings.keepbouquets.value.split("|") if self.listTv is not None and self.listRadio is not None: for x in self.listTv: if x[0] in self.bouquets: self.drawList.append(self.buildListEntry(True, x[1], "TV")) else: self.drawList.append(self.buildListEntry( False, x[1], "TV")) self.listAll.append(x) for x in self.listRadio: if x[0] in self.bouquets: self.drawList.append( self.buildListEntry(True, x[1], "Radio")) else: self.drawList.append( self.buildListEntry(False, x[1], "Radio")) self.listAll.append(x) self["list"].setList(self.drawList)
def load(self): STDeflate().deflate(self.filename) settings = SettingsLoader() settings.apply() try: shutil.rmtree(TMP_SETTINGS_PWD) except Exception, e: pass
def installSettings(id): try: shutil.rmtree(TMP_IMPORT_PWD) except: pass api = SAPCL() result = api.getChannelsSetting(id) if not result["result"]: return False STDeflate().deflate(result["filename"]) settings = SettingsLoader() settings.apply() try: shutil.rmtree(TMP_SETTINGS_PWD) except Exception, e: pass
def refresh(self): settings = SettingsLoader() self.listTv = settings.readBouquetsTvList(ENIGMA2_SETTINGS_PWD) self.listRadio = settings.readBouquetsRadioList(ENIGMA2_SETTINGS_PWD) self.drawList = [] self.listAll = [] self.bouquets = config.sifteam.settings.keepbouquets.value.split("|") if self.listTv is not None and self.listRadio is not None: for x in self.listTv: if x[0] in self.bouquets: self.drawList.append(self.buildListEntry(True, x[1], "TV")) else: self.drawList.append(self.buildListEntry(False, x[1], "TV")) self.listAll.append(x) for x in self.listRadio: if x[0] in self.bouquets: self.drawList.append(self.buildListEntry(True, x[1], "Radio")) else: self.drawList.append(self.buildListEntry(False, x[1], "Radio")) self.listAll.append(x) self["list"].setList(self.drawList)