def configSetup(self): self.standbyEntry = getConfigListEntry(_("FanOFF InStanby"), config.plugins.manualfancontrols.standbymode) self.pwmEntry = getConfigListEntry(_("PWM value"), config.plugins.manualfancontrols.pwmvalue) self.periodEntry = getConfigListEntry(_("Status Check Period"), config.plugins.manualfancontrols.checkperiod) if not self.displayCurrentValue in self["config"].onSelectionChanged: self["config"].onSelectionChanged.append(self.displayCurrentValue) self.createSetup()
def __init__(self, session, plugin_path): self.skin_path = plugin_path Screen.__init__(self, session) self.list = [ ] self.onChangedEntry = [ ] ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedClockEntry) self.setup_title = _("Setup AnalogClock colors") self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keySave, "ok": self.keySave, }, -2) self["key_green"] = Label(_("Ok")) self["key_red"] = Label(_("Cancel")) self["version"] = Label("v%s" % VERSION) cfg.background.value[0] = int(cfg.transparency.value) self.background = _("Background (a,r,g,b)") self.list.append(getConfigListEntry(_("Hand's color (a,r,g,b)"), cfg.hands_color)) self.list.append(getConfigListEntry(_("Seconds color (a,r,g,b)"), cfg.shand_color)) self.list.append(getConfigListEntry(_("Face's color (a,r,g,b)"), cfg.faces_color)) self.list.append(getConfigListEntry( self.background, cfg.background)) self["config"].list = self.list self["config"].setList(self.list) self.onLayoutFinish.append(self.layoutFinished)
def updateList(self, ret=None): self.list = [] self.cihelper_ci0 = NoSave(ConfigYesNo(default='True')) if fileExists('/dev/ci1'): self.cihelper_ci1 = NoSave(ConfigYesNo(default='True')) else: self.cihelper_ci1 = ConfigNothing() if fileExists('/etc/cihelper.conf'): f = open('/etc/cihelper.conf', 'r') for line in f.readlines(): line = line.strip() if line.startswith('ENABLE_CI0='): if line[11:] == 'no': self.cihelper_ci0.value = False else: self.cihelper_ci0.value = True cihelper_ci0x = getConfigListEntry(_("Enable CIHelper for SLOT CI0") + ":", self.cihelper_ci0) self.list.append(cihelper_ci0x) elif line.startswith('ENABLE_CI1='): if line[11:] == 'no': self.cihelper_ci1.value = False else: self.cihelper_ci1.value = True if fileExists('/dev/ci1'): cihelper_ci1x = getConfigListEntry(_("Enable CIHelper for SLOT CI1") + ":", self.cihelper_ci1) self.list.append(cihelper_ci1x) f.close() self['config'].list = self.list self['config'].l.setList(self.list)
def __init__(self, session): Screen.__init__(self, session) self["actions"] = ActionMap(["SetupActions", "MenuActions"], { "ok": self.keyGo, "cancel": self.keyCancel, "menu": self.closeRecursive, }, -2) nim_list = [] # collect all nims which are *not* set to "nothing" for n in nimmanager.nim_slots: if not n.isCompatible("DVB-S"): continue if n.config_mode == "nothing": continue if n.config_mode in ("loopthrough", "satposdepends"): root_id = nimmanager.sec.getRoot(n.slot_id, int(n.config.connectedTo.value)) if n.type == nimmanager.nim_slots[root_id].type: # check if connected from a DVB-S to DVB-S2 Nim or vice versa continue nim_list.append((str(n.slot), n.friendly_full_description)) self.scan_nims = ConfigSelection(choices = nim_list) provider_list = [] provider_list.append((str(900), 'Canal Digitaal')) provider_list.append((str(910), 'TV Vlaanderen')) provider_list.append((str(920), 'TéléSAT')) provider_list.append((str(930), 'Mobistar NL')) provider_list.append((str(940), 'Mobistar FR')) provider_list.append((str(950), 'AustriaSat')) provider_list.append((str(30), 'Czech Republic')) provider_list.append((str(31), 'Slovak Republic')) self.scan_provider = ConfigSelection(choices = provider_list) self.scan_hd = ConfigYesNo(default = False) self.scan_keepnumbering = ConfigYesNo(default = False) self.scan_keepsettings = ConfigYesNo(default = False) self.list = [] self.tunerEntry = getConfigListEntry(_("Tuner"), self.scan_nims) self.list.append(self.tunerEntry) self.scanProvider = getConfigListEntry(_("Provider"), self.scan_provider) self.list.append(self.scanProvider) self.scanHD = getConfigListEntry(_("HD list"), self.scan_hd) self.list.append(self.scanHD) self.list.append(getConfigListEntry(_("Use fastscan channel numbering"), self.scan_keepnumbering)) self.list.append(getConfigListEntry(_("Use fastscan channel names"), self.scan_keepsettings)) ConfigListScreen.__init__(self, self.list) self["config"].list = self.list self["config"].l.setList(self.list) self.finished_cb = None self["introduction"] = Label(_("Select your provider, and press OK to start the scan"))
def __init__(self, session, entry): Screen.__init__(self, session) self.title = _("WeatherPlugin: Edit Entry") self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "green": self.keySave, "red": self.keyCancel, "blue": self.keyDelete, "yellow": self.searchLocation, "cancel": self.keyCancel }, -2) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self["key_blue"] = StaticText(_("Delete")) self["key_yellow"] = StaticText(_("Search Code")) if entry is None: self.newmode = 1 self.current = initWeatherPluginEntryConfig() else: self.newmode = 0 self.current = entry cfglist = [ getConfigListEntry(_("City"), self.current.city), getConfigListEntry(_("Location code"), self.current.weatherlocationcode), getConfigListEntry(_("System"), self.current.degreetype) ] ConfigListScreen.__init__(self, cfglist, session)
def __init__(self, session, pin, pinname): Screen.__init__(self, session) # for the skin: first try ParentalControlChangePin, then Setup, this allows individual skinning self.skinName = ["ParentalControlChangePin", "Setup"] self.setup_title = _("Change pin code") self.onChangedEntry = [] self.pin = pin self.list = [] self.pin1 = ConfigPIN(default=1111, censor="*") self.pin2 = ConfigPIN(default=1112, censor="*") self.pin1.addEndNotifier(boundFunction(self.valueChanged, 1)) self.pin2.addEndNotifier(boundFunction(self.valueChanged, 2)) self.list.append(getConfigListEntry(_("New PIN"), NoSave(self.pin1))) self.list.append(getConfigListEntry(_("Reenter new PIN"), NoSave(self.pin2))) ConfigListScreen.__init__(self, self.list) # print "old pin:", pin # if pin.value != "aaaa": # self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.pinEntered, PinInput, pinList = [self.pin.value], title = _("please enter the old pin"), windowTitle = _("Change pin code"))) ProtectedScreen.__init__(self) self["actions"] = NumberActionMap( ["DirectionActions", "ColorActions", "OkCancelActions"], {"cancel": self.cancel, "red": self.cancel, "save": self.keyOK}, -1, ) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session, pin, pin_slot): Screen.__init__(self, session) self.skinName = ["ParentalControlChangePin", "Setup" ] self.setup_title = _("Enter pin code") self.onChangedEntry = [ ] self.slot = pin_slot self.pin = pin self.list = [] self.pin1 = ConfigPIN(default = 0, censor = "*") self.pin2 = ConfigPIN(default = 0, censor = "*") self.pin1.addEndNotifier(boundFunction(self.valueChanged, 1)) self.pin2.addEndNotifier(boundFunction(self.valueChanged, 2)) self.list.append(getConfigListEntry(_("Enter PIN"), NoSave(self.pin1))) self.list.append(getConfigListEntry(_("Reenter PIN"), NoSave(self.pin2))) ConfigListScreen.__init__(self, self.list) self["actions"] = NumberActionMap(["DirectionActions", "ColorActions", "OkCancelActions"], { "cancel": self.cancel, "red": self.cancel, "save": self.keyOK, }, -1) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session): self.session = session Screen.__init__(self, session) self["instructions"] = Label(self._instructions % config.plugins.icetv.member.email_address.value) self["description"] = Label() self["key_red"] = Label(_("Cancel")) self["key_green"] = Label(_("Login")) self["key_yellow"] = Label() self["key_blue"] = Label(_("Keyboard")) self["VKeyIcon"] = Pixmap() self.list = [ getConfigListEntry(self._password, config.plugins.icetv.member.password, _("Your existing IceTV password.")), getConfigListEntry(self._update_interval, config.plugins.icetv.refresh_interval, _("Choose how often to connect to IceTV server to check for updates.")), ] ConfigListScreen.__init__(self, self.list, session) self["InpActions"] = ActionMap(contexts=["SetupActions", "ColorActions"], actions={ "cancel": self.cancel, "red": self.cancel, "green": self.doLogin, "blue": self.keyboard, "ok": self.keyboard, }, prio=-2)
def __init__(self, session): Screen.__init__(self, session) self["actions"] = ActionMap(["SetupActions", "MenuActions"], { "ok": self.keyGo, "save": self.keyGo, "cancel": self.keyCancel, "menu": self.doCloseRecursive, }, -2) self.session.postScanService = session.nav.getCurrentlyPlayingServiceOrGroup() self.list = [] tlist = [] known_networks = [ ] nims_to_scan = [ ] self.finished_cb = None for nim in nimmanager.nim_slots: # collect networks provided by this tuner need_scan = False networks = self.getNetworksForNim(nim) print "nim %d provides" % nim.slot, networks print "known:", known_networks # we only need to scan on the first tuner which provides a network. # this gives the first tuner for each network priority for scanning. for x in networks: if x not in known_networks: need_scan = True print x, "not in ", known_networks known_networks.append(x) # don't offer to scan nims if nothing is connected if not nimmanager.somethingConnected(nim.slot): need_scan = False if need_scan: nims_to_scan.append(nim) # we save the config elements to use them on keyGo self.nim_enable = [ ] if len(nims_to_scan): self.scan_clearallservices = ConfigSelection(default = "yes", choices = [("no", _("no")), ("yes", _("yes")), ("yes_hold_feeds", _("yes (keep feeds)"))]) self.list.append(getConfigListEntry(_("Clear before scan"), self.scan_clearallservices)) for nim in nims_to_scan: nimconfig = ConfigYesNo(default = True) nimconfig.nim_index = nim.slot self.nim_enable.append(nimconfig) self.list.append(getConfigListEntry(_("Scan ") + nim.slot_name + " (" + nim.friendly_type + ")", nimconfig)) ConfigListScreen.__init__(self, self.list) self["header"] = Label(_("Automatic scan")) self["footer"] = Label(_("Press OK to scan"))
def __init__(self, session, pin, pinname): Screen.__init__(self, session) # for the skin: first try ParentalControlChangePin, then Setup, this allows individual skinning self.skinName = ["ParentalControlChangePin", "Setup" ] self.setup_title = _("Change pin code") self.onChangedEntry = [ ] self.pin = pin self.list = [] self.pin1 = ConfigPIN(default = 1111, censor = "*") self.pin2 = ConfigPIN(default = 1112, censor = "*") self.pin1.addEndNotifier(boundFunction(self.valueChanged, 1)) self.pin2.addEndNotifier(boundFunction(self.valueChanged, 2)) self.list.append(getConfigListEntry(_("New PIN"), NoSave(self.pin1))) self.list.append(getConfigListEntry(_("Re-enter new PIN"), NoSave(self.pin2))) ConfigListScreen.__init__(self, self.list) ProtectedScreen.__init__(self) self["actions"] = NumberActionMap(["DirectionActions", "ColorActions", "OkCancelActions", "MenuActions"], { "cancel": self.keyCancel, "red": self.keyCancel, "save": self.keyOK, "menu": self.closeRecursive, }, -1) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session): self.session = session Screen.__init__(self, session) self["instructions"] = Label(self._instructions) self["description"] = Label() self["HelpWindow"] = Label() self["key_red"] = Label(_("Cancel")) self["key_green"] = Label(_("Save")) self["key_yellow"] = Label() self["key_blue"] = Label(_("Keyboard")) self["VKeyIcon"] = Pixmap() self.list = [ getConfigListEntry(self._email, config.plugins.icetv.member.email_address, _("Your email address is used to login to IceTV services.")), getConfigListEntry(self._password, config.plugins.icetv.member.password, _("Your password must have at least 5 characters.")), getConfigListEntry(self._label, config.plugins.icetv.device.label, _("Choose a label that will identify this device within IceTV services.")), getConfigListEntry(self._update_interval, config.plugins.icetv.refresh_interval, _("Choose how often to connect to IceTV server to check for updates.")), ] ConfigListScreen.__init__(self, self.list, session) self["InusActions"] = ActionMap(contexts=["SetupActions", "ColorActions"], actions={ "cancel": self.cancel, "red": self.cancel, "green": self.save, "blue": self.keyboard, "ok": self.keyboard, }, prio=-2)
def createMenu(self): try: test = self.index except: return self.list = [] if self.index == self.STATE_UPDATE: if config.misc.installwizard.hasnetwork.value: self.list.append( getConfigListEntry( _("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled ) ) else: self.list.append( getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled) ) elif self.index == self.STATE_CHOISE_CHANNELLIST: self.list.append(getConfigListEntry(_("Install channel list"), self.enabled)) if self.enabled.value: self.list.append(getConfigListEntry(_("Channel list type"), self.channellist_type)) # elif self.index == self.STATE_CHOISE_SOFTCAM: # self.list.append(getConfigListEntry(_("Install softcam"), self.enabled)) # if self.enabled.value: # self.list.append(getConfigListEntry(_("Softcam type"), self.softcam_type)) self["config"].list = self.list self["config"].l.setList(self.list)
def createSetup(self): self.list = [] if self.login == 0: self["step"].setText(_("#Step 1")) if self.hideDeleteButton: self["key_yellow"] = StaticText(_(" ")) self["text"].setText(_("Press blue button after entering current PW to change PW")) else: self["key_yellow"] = StaticText(_("Delete")) self["text"].setText( _( "Press yellow button after entering current PW to delete PW\nPress blue button after entering current PW to change PW" ) ) self.list.append(getConfigListEntry(_("Enter current password :"******"state"].setText(_("Insert current PW with characters (0-9, a-z, A-Z)")) else: self["step"].setText(_("#Step 2")) if self.hideDeleteButton: self["key_yellow"] = StaticText(_(" ")) self["text"].setText(_("Press blue button after entering new PW to change PW")) else: self["key_yellow"] = StaticText(_("Delete")) self["text"].setText( _("Press yellow button to delete PW\nPress blue button after entering new PW to change PW") ) self.list.append(getConfigListEntry(_("Enter new password :"******"state"].setText(_("Insert new PW with characters (0-9, a-z, A-Z)")) self["config"].list = self.list self["config"].l.setList(self.list)
def initConfigList(self, element=None): try: self.properties.position = ConfigInteger(default = self.title_idx+1, limits = (1, len(self.project.titles))) title = self.project.titles[self.title_idx] self.list = [] self.list.append(getConfigListEntry("DVD " + _("Track"), self.properties.position)) self.list.append(getConfigListEntry("DVD " + _("Title"), self.properties.menutitle)) self.list.append(getConfigListEntry("DVD " + _("Description"), self.properties.menusubtitle)) if config.usage.setup_level.index >= 2: # expert+ for audiotrack in self.properties.audiotracks: DVB_aud = audiotrack.DVB_lang.getValue() or audiotrack.pid.getValue() self.list.append(getConfigListEntry(_("burn audio track (%s)") % DVB_aud, audiotrack.active)) if audiotrack.active.getValue(): self.list.append(getConfigListEntry(_("audio track (%s) format") % DVB_aud, audiotrack.format)) self.list.append(getConfigListEntry(_("audio track (%s) language") % DVB_aud, audiotrack.language)) self.list.append(getConfigListEntry("DVD " + _("Aspect Ratio"), self.properties.aspect)) if self.properties.aspect.getValue() == "16:9": self.list.append(getConfigListEntry("DVD " + "widescreen", self.properties.widescreen)) else: self.list.append(getConfigListEntry("DVD " + "widescreen", self.properties.crop)) if len(title.chaptermarks) == 0: self.list.append(getConfigListEntry(_("Auto chapter split every ? minutes (0=never)"), self.properties.autochapter)) infotext = "DVB " + _("Title") + ': ' + title.DVBname + "\n" + _("Description") + ': ' + title.DVBdescr + "\n" + _("Channel") + ': ' + title.DVBchannel + '\n' + _("Begin time") + title.formatDVDmenuText(": $D.$M.$Y, $T\n", self.title_idx+1) chaptermarks = title.getChapterMarks(template="$h:$m:$s") chapters_count = len(chaptermarks) if chapters_count >= 1: infotext += str(chapters_count+1) + ' ' + _("chapters") + ': ' infotext += ' / '.join(chaptermarks) self["serviceinfo"].setText(infotext) self["config"].setList(self.list) except AttributeError: pass
def createSetup(self): self.list = [] self.list.append(getConfigListEntry(_("Schedule MountAgain"), config.networkbrowser.automountpoll)) if config.networkbrowser.automountpoll.value: self.list.append(getConfigListEntry(_("Re-mount network shares every (in hours)"), config.networkbrowser.automountpolltimer)) self["config"].list = self.list self["config"].setList(self.list)
def createConfig(self): self.name_list = [] self.mouse_list = None self.keyboard_list = None self.devices = [(x, iInputDevices.getDeviceName(x).replace("dreambox advanced remote control (native)", "Remote Control").replace("dreambox front panel", "Front Panel") + "(" + x + ")") for x in iInputDevices.getDeviceList()] if self.conf_mouse == "": self.conf_mouse = "event1" self.mouse = ConfigSelection(default = self.conf_mouse, choices = self.devices) self.list.append(getConfigListEntry(_('Mouse'), _(self.mouse))) if self.conf_keyboard == "": self.conf_keyboard = "event1" self.keyboard = ConfigSelection(default = self.conf_keyboard, choices = self.devices) self.list.append(getConfigListEntry(_('Keyboard'), _(self.keyboard))) if self.conf_alpha == "": self.conf_alpha = "255" self.alpha = ConfigSlider(default = int(self.conf_alpha), increment = 10, limits = (0, 255)) self.list.append(getConfigListEntry(_("Alpha Value"), self.alpha)) if self.conf_keymap == "": self.conf_keymap = self.getLanguage() self.lang_list = [("en", "English"), ("de", "German")] self.langs = ConfigSelection(default = self.conf_keymap, choices = self.lang_list) self.list.append(getConfigListEntry(_("Language"), self.langs)) self["config"].list = self.list self["config"].l.setList(self.list)
def createSetup(self): self.list = [] params = BrowserPositionSetting().getPosition() vbcfg.setPosition(params) left = params[0] width = params[1] top = params[2] height = params[3] self.dst_left = ConfigSlider(default = left, increment = 5, limits = (0, 720)) self.dst_width = ConfigSlider(default = width, increment = 5, limits = (0, 720)) self.dst_top = ConfigSlider(default = top, increment = 5, limits = (0, 576)) self.dst_height = ConfigSlider(default = height, increment = 5, limits = (0, 576)) self.dst_left_entry = getConfigListEntry(_("left"), self.dst_left) self.dst_width_entry = getConfigListEntry(_("width"), self.dst_width) self.dst_top_entry = getConfigListEntry(_("top"), self.dst_top) self.dst_height_entry = getConfigListEntry(_("height"), self.dst_height) self.list.append(self.dst_left_entry) self.list.append(self.dst_width_entry) self.list.append(self.dst_top_entry) self.list.append(self.dst_height_entry) self["config"].list = self.list self["config"].l.setList(self.list)
def createSetup(self): self.list = [] self.mountusingEntry = getConfigListEntry(_("Mount using"), self.mountusingConfigEntry) self.list.append(self.mountusingEntry) self.activeEntry = getConfigListEntry(_("Active"), self.activeConfigEntry) self.list.append(self.activeEntry) self.sharenameEntry = getConfigListEntry(_("Local share name"), self.sharenameConfigEntry) self.list.append(self.sharenameEntry) self.mounttypeEntry = getConfigListEntry(_("Mount type"), self.mounttypeConfigEntry) self.list.append(self.mounttypeEntry) self.ipEntry = getConfigListEntry(_("Server IP"), self.ipConfigEntry) self.list.append(self.ipEntry) self.sharedirEntry = getConfigListEntry(_("Server share"), self.sharedirConfigEntry) self.list.append(self.sharedirEntry) self.hdd_replacementEntry = getConfigListEntry(_("use as HDD replacement"), self.hdd_replacementConfigEntry) self.list.append(self.hdd_replacementEntry) self.optionsEntry = getConfigListEntry(_("Mount options"), self.optionsConfigEntry) self.list.append(self.optionsEntry) if self.mounttypeConfigEntry.value == "cifs": self.usernameEntry = getConfigListEntry(_("Username"), self.usernameConfigEntry) self.list.append(self.usernameEntry) self.passwordEntry = getConfigListEntry(_("Password"), self.passwordConfigEntry) self.list.append(self.passwordEntry) self["config"].list = self.list self["config"].l.setList(self.list) self["config"].onSelectionChanged.append(self.selectionChanged)
def createSetup(self): level = config.usage.setup_level.index self.list = [] if level >= 1: if SystemInfo['CanPcmMultichannel']: self.list.append(getConfigListEntry(_('PCM Multichannel'), config.av.pcm_multichannel, _('Choose whether multi channel sound tracks should be output as PCM.'))) if SystemInfo['CanDownmixAC3']: self.list.append(getConfigListEntry(_('Dolby Digital / DTS downmix'), config.av.downmix_ac3, _('Choose whether multi channel sound tracks should be downmixed to stereo.'))) if SystemInfo['CanDownmixAAC']: self.list.append(getConfigListEntry(_('AAC downmix'), config.av.downmix_aac, _('Choose whether multi channel sound tracks should be downmixed to stereo.'))) if SystemInfo['Canaudiosource']: self.list.append(getConfigListEntry(_('Audio Source'), config.av.audio_source, _('Choose whether multi channel sound tracks should be convert to PCM or SPDIF.'))) if SystemInfo['CanAACTranscode']: self.list.append(getConfigListEntry(_('AAC transcoding'), config.av.transcodeaac, _('Choose whether AAC sound tracks should be transcoded.'))) self.list.extend((getConfigListEntry(_('General AC3 delay'), config.av.generalAC3delay, _('This option configures the general audio delay of Dolby Digital sound tracks.')), getConfigListEntry(_('General PCM delay'), config.av.generalPCMdelay, _('This option configures the general audio delay of stereo sound tracks.')))) if SystemInfo['Can3DSurround']: self.list.append(getConfigListEntry(_('3D Surround'), config.av.surround_3d, _('This option allows you to enable 3D Surround Sound.'))) if SystemInfo['Can3DSpeaker'] and config.av.surround_3d.value != 'none': self.list.append(getConfigListEntry(_('3D Surround Speaker Position'), config.av.surround_3d_speaker, _('This option allows you to change the virtuell loadspeaker position.'))) if SystemInfo['CanAutoVolume']: self.list.append(getConfigListEntry(_('Audio Auto Volume Level'), config.av.autovolume, _('This option configures you can set Auto Volume Level.'))) if SystemInfo['Canedidchecking']: self.list.append(getConfigListEntry(_('Bypass HDMI EDID Check'), config.av.bypass_edid_checking, _('This option allows you to bypass HDMI EDID check'))) self['config'].list = self.list self['config'].l.setList(self.list) if config.usage.sort_settings.value: self['config'].list.sort()
def __init__(self, session): Screen.__init__(self, session) self.setup_title = _("OSD 3D Setup") self.skinName = "Setup" self["status"] = StaticText() self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self["actions"] = ActionMap(["SetupActions"], { "cancel": self.keyCancel, "save": self.keySave, }, -2) self.onChangedEntry = [ ] self.list = [] ConfigListScreen.__init__(self, self.list, session = self.session, on_change = self.changedEntry) self.list.append(getConfigListEntry(_("3D Mode"), config.osd.threeDmode, _("This option lets you choose the 3D mode"))) self.list.append(getConfigListEntry(_("Depth"), config.osd.threeDznorm, _("This option lets you adjust the 3D depth"))) self.list.append(getConfigListEntry(_("Show in extensions list ?"), config.osd.show3dextensions, _("This option lets you show the option in the extension screen"))) self["config"].list = self.list self["config"].l.setList(self.list) self.onLayoutFinish.append(self.layoutFinished) if not self.selectionChanged in self["config"].onSelectionChanged: self["config"].onSelectionChanged.append(self.selectionChanged) self.selectionChanged()
def createSetup(self, configlist): self.list = [ getConfigListEntry(_("Date"), self.timeinput_date), getConfigListEntry(_("Time"), self.timeinput_time) ] configlist.list = self.list configlist.l.setList(self.list)
def createSetup(self): self.list = [ ] string = _("LAN Setting On/Off") self.enableEntry = getConfigListEntry(string, self.mode_4dssetup) if self.enableEntry: if isinstance(self.enableEntry[1], ConfigOnOff): self.enableConfigEntry = self.enableEntry[1] self.list.append(self.enableEntry) self["statuspic"].hide() if self.enableConfigEntry: if os.path.exists("/etc/.4dsmode"): self.list.append(getConfigListEntry(_(" Connection"))) if SR.getInstance().checkInfo() == 0: self["statuspic"].setPixmapNum(0) else: self["statuspic"].setPixmapNum(1) self["statuspic"].show() self["list"] = List(self.list) self["config"].list = self.list self["config"].l.setList(self.list) self.SelectionChanged()
def __init__(self, session, device=None): Screen.__init__(self, session) self.working = False self.session = session self.console = None self["key_red"] = Label(_("Progress")) self["key_green"] = Label(_("Backup")) self["key_yellow"] = Label(_("Keyboard")) self["key_blue"] = Label(_("Location")) if device: config.plugins.DVDBackup.device.value = device ConfigListScreen.__init__(self, [ getConfigListEntry(_("Device:"), config.plugins.DVDBackup.device), getConfigListEntry(_("Directory:"), config.plugins.DVDBackup.directory), getConfigListEntry(_("Name:"), config.plugins.DVDBackup.name), getConfigListEntry(_("Log:"), config.plugins.DVDBackup.log), getConfigListEntry(_("Create iso:"), config.plugins.DVDBackup.create_iso)]) self["actions"] = ActionMap(["ColorActions", "OkCancelActions"], { "red": self.progress, "green": self.backup, "yellow": self.keyboard, "blue": self.location, "cancel": self.exit }, -1) self["config"].onSelectionChanged.append(self.checkConfig) self.onLayoutFinish.append(self.getName)
def GetConfigList(): optionList = [] optionList.append(getConfigListEntry(_("Language"), config.plugins.iptvplayer.tvjworg_language)) optionList.append(getConfigListEntry(_("Default video quality"), config.plugins.iptvplayer.tvjworg_default_format)) optionList.append(getConfigListEntry(_("Use default video quality"), config.plugins.iptvplayer.tvjworg_use_df)) optionList.append(getConfigListEntry(_("Icon type"), config.plugins.iptvplayer.tvjworg_icontype)) return optionList
def GetConfigList(): optionList = [] optionList.append(getConfigListEntry("web-live.tv użytkownik premium?", config.plugins.iptvplayer.satlivetv_premium)) if config.plugins.iptvplayer.satlivetv_premium.value: optionList.append(getConfigListEntry("web-live.tv login:"******"web-live.tv hasło:", config.plugins.iptvplayer.satlivetv_password)) return optionList
def __init__(self, session, entry, configPSR): self.session = session Screen.__init__(self, session) self.title = _("PipServiceRelation - Entry Config") self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "green": self.keySave, "red": self.keyCancel, "cancel": self.keyCancel, "ok": self.keySelect, }, -2) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self.configPSR = configPSR self.entry = entry if entry is None: self.currentKey = None self.ref1 = NoSave(ConfigDirectory(default = _("Press OK to select a service"))) self.ref2 = NoSave(ConfigDirectory(default = _("Press OK to select a related PiP service"))) else: self.currentKey = entry[0] self.ref1 = NoSave(ConfigDirectory(default = ServiceReference(eServiceReference(entry[0])).getServiceName())) self.ref2 = NoSave(ConfigDirectory(default = ServiceReference(eServiceReference(entry[1])).getServiceName())) self.list = [ ] self.serviceref1 = getConfigListEntry(_("Service"), self.ref1) self.serviceref2 = getConfigListEntry(_("Related Pip Service"), self.ref2) self.list.append(self.serviceref1) self.list.append(self.serviceref2) ConfigListScreen.__init__(self, self.list, session)
def __init__(self, session): Screen.__init__(self, session) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self.list = [ getConfigListEntry(_("Show cover:"), config.plugins.shoutcast.showcover), getConfigListEntry(_("Coverwidth:"), config.plugins.shoutcast.coverwidth), getConfigListEntry(_("Coverheight:"), config.plugins.shoutcast.coverheight), getConfigListEntry(_("Show in extension menu:"), config.plugins.shoutcast.showinextensions), getConfigListEntry(_("Streaming rate:"), config.plugins.shoutcast.streamingrate), getConfigListEntry(_("Reload station list:"), config.plugins.shoutcast.reloadstationlist), getConfigListEntry(_("Rip to single file, name is timestamped"), config.plugins.shoutcast.riptosinglefile), getConfigListEntry(_("Create a directory for each stream"), config.plugins.shoutcast.createdirforeachstream), getConfigListEntry(_("Add sequence number to output file"), config.plugins.shoutcast.addsequenceoutputfile), ] self.dirname = getConfigListEntry(_("Recording location:"), config.plugins.shoutcast.dirname) self.list.append(self.dirname) ConfigListScreen.__init__(self, self.list, session) self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], { "green": self.keySave, "cancel": self.keyClose, "ok": self.keySelect, }, -2)
def __init__(self, session): self.skin = OSD3DSetupScreen.skin Screen.__init__(self, session) from Components.ActionMap import ActionMap from Components.Button import Button self["ok"] = Button(_("OK")) self["cancel"] = Button(_("Cancel")) self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "ok": self.keyGo, "save": self.keyGo, "cancel": self.keyCancel, "green": self.keyGo, "red": self.keyCancel, }, -2) self.list = [] ConfigListScreen.__init__(self, self.list, session = self.session) mode = config.plugins.OSD3DSetup.mode.value znorm = config.plugins.OSD3DSetup.znorm.value self.mode = ConfigSelection(choices = modelist, default = mode) self.znorm = ConfigSlider(default = znorm + 50, increment = 1, limits = (0, 100)) self.list.append(getConfigListEntry(_("3d mode"), self.mode)) self.list.append(getConfigListEntry(_("Depth"), self.znorm)) self["config"].list = self.list self["config"].l.setList(self.list)
def GetConfigList(): optionList = [] optionList.append( getConfigListEntry( "Preferowany protokół:", config.plugins.iptvplayer.playpuls_defaultproto ) ) optionList.append( getConfigListEntry( "Domyślny jakość video:", config.plugins.iptvplayer.playpuls_defaultformat ) ) optionList.append( getConfigListEntry( "Używaj domyślnej jakości video:", config.plugins.iptvplayer.playpuls_usedf ) ) optionList.append( getConfigListEntry( "PlayPuls korzystaj z proxy?", config.plugins.iptvplayer.playpuls_proxy) ) return optionList
def __init__(self, session, entry, configVA): self.session = session Screen.__init__(self, session) self.title = _("Automatic Volume Adjustment - Entry Config") self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "green": self.keySave, "red": self.keyCancel, "cancel": self.keyCancel, "ok": self.keySelect, }, -2) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self.configVA = configVA if entry is None: self.newmode = 1 self.current = self.configVA.initEntryConfig() self.currentvalue = self.current.adjustvalue.value else: self.newmode = 0 self.current = entry self.currentref = entry.servicereference.value self.currentvalue = entry.adjustvalue.value self.list = [ ] self.service = getConfigListEntry(_("Servicename"), self.current.name) self.list.append(self.service) self.adjustValue = getConfigListEntry(_("Adjustment value"), self.current.adjustvalue) self.list.append(self.adjustValue) ConfigListScreen.__init__(self, self.list, session) self.automaticVolumeAdjustmentInstance = AutomaticVolumeAdjustment.instance
def createSetup(self): global addnotifier self.list = [] self.list.append( getConfigListEntry(_("Event font size (relative to skin size)"), config.misc.graph_mepg.ev_fontsize)) self.list.append( getConfigListEntry(_("Time scale"), config.misc.graph_mepg.prev_time_period)) self.list.append( getConfigListEntry(_("Prime time"), config.misc.graph_mepg.prime_time)) self.list.append( getConfigListEntry(_("Items per page "), config.misc.graph_mepg.items_per_page)) self.list.append( getConfigListEntry( _("Items per page for list screen"), config.misc.graph_mepg.items_per_page_listscreen)) self.list.append( getConfigListEntry(_("Start with list screen"), config.misc.graph_mepg.default_mode)) self.list.append( getConfigListEntry(_("Skip empty services"), config.misc.graph_mepg.overjump)) self.list.append( getConfigListEntry(_("Service title mode"), config.misc.graph_mepg.servicetitle_mode)) self.list.append( getConfigListEntry(_("Round start time on"), config.misc.graph_mepg.roundTo)) self.list.append( getConfigListEntry(_("Function of OK button"), config.misc.graph_mepg.OKButton)) self.list.append( getConfigListEntry(_("Alignment of service names"), config.misc.graph_mepg.servicename_alignment)) self.list.append( getConfigListEntry(_("Alignment of events"), config.misc.graph_mepg.event_alignment)) self.list.append( getConfigListEntry(_("Show vertical timelines"), config.misc.graph_mepg.show_timelines)) self.list.append( getConfigListEntry(_("Center time-labels and remove date"), config.misc.graph_mepg.center_timeline)) self.list.append( getConfigListEntry(_("Show in extensions menu"), config.misc.graph_mepg.extension_menu)) self.list.append( getConfigListEntry(_("Silently zap between bouquets"), config.misc.graph_mepg.silent_bouquet_change)) if addnotifier is None: addnotifier = config.misc.graph_mepg.extension_menu.addNotifier( plugins.reloadPlugins, initial_call=False) self["config"].list = self.list self["config"].l.setList(self.list)
def createSetup(self, widget): self.list = [] self.entryName = getConfigListEntry(_("Name"), self.timerentry_name) self.list.append(self.entryName) self.entryDescription = getConfigListEntry(_("Description"), self.timerentry_description) self.list.append(self.entryDescription) self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_("Repeat type"), self.timerentry_type) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry( _("Starting on"), self.timerentry_repeatedbegindate) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append( getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append( getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append( getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append( getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append( getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append( getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append( getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append( getConfigListEntry(_("Sunday"), self.timerentry_day[6])) if self.timerentry_justplay.value != "zap": self.list.append( getConfigListEntry( _("Rename name and description for new events"), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("Start time"), self.timerentry_starttime) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime) self.entryZapWakeup = getConfigListEntry( _("Wakeup receiver for start timer"), self.timerentry_zapwakeup) if self.timerentry_justplay.value == "zap": self.list.append(self.entryZapWakeup) self.list.append(self.entryShowEndTime) self["key_blue"].setText(_("Wakeup type")) else: self["key_blue"].setText("") self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service) self.list.append(self.channelEntry) self.dirname = getConfigListEntry(_("Location"), self.timerentry_dirname) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset) if self.timerentry_justplay.value != "zap": if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append( getConfigListEntry(_("After event"), self.timerentry_afterevent)) self.list.append( getConfigListEntry(_("Recording type"), self.timerentry_recordingtype)) self[widget].list = self.list self[widget].l.setList(self.list)
def createSetup(self): self.editListEntry = None self.list = [] self.list.append(getConfigListEntry(_("Enable led"), config.plugins.VFD_Giga.setLed)) if config.plugins.VFD_Giga.setLed.value: if BOX in ("gbquad4k", "gbue4k", 'gbquadplus'): self.list.append(getConfigListEntry(_("Led Deep Standby"), config.plugins.VFD_Giga.ledDSBY2)) self.list.append(getConfigListEntry(_("Led state RUN"), config.plugins.VFD_Giga.ledRUN)) self.list.append(getConfigListEntry(_("Led state Standby"), config.plugins.VFD_Giga.ledSBY)) if BOX not in ("gbtrio4k", "gbquad", "gbquad4k", "gbue4k", "gb800ueplus", "gb800seplus", "gbquadplus", "gbipbox", "gbultra", "gbultraue", "gbultraueh", "gbultrase", "gbx1", "gbx2", "gbx3", "gbx3h"): self.list.append(getConfigListEntry(_("Led state Deep Standby"), config.plugins.VFD_Giga.ledDSBY)) self.list.append(getConfigListEntry(_("Led state Record"), config.plugins.VFD_Giga.ledREC)) self.list.append(getConfigListEntry(_("Blink Record Led"), config.plugins.VFD_Giga.recLedBlink)) self.list.append(getConfigListEntry(_("Led state HDD /dev/sda active"), config.plugins.VFD_Giga.ledSDA1)) self.list.append(getConfigListEntry(_("Led state HDD /dev/sdb active"), config.plugins.VFD_Giga.ledSDB1)) setLed(config.plugins.VFD_Giga.ledRUN.getValue()) else: setLed("0") if BOX in ("gb800seplus", "gbultra", "gbultrase", "gbtrio4k"): self.list.append(getConfigListEntry(_("Brightness"), config.plugins.VFD_Giga.vfdBrightness)) self.list.append(getConfigListEntry(_("Brightness Standby"), config.plugins.VFD_Giga.vfdBrightnessStandby)) if BOX in ('gb800se', 'gb800solo', "gb800seplus", "gbultra", "gbultrase", "gbtrio4k"): self.list.append(getConfigListEntry(_("Show on VFD"), config.plugins.VFD_Giga.showClock)) if BOX in ('gb800se', 'gb800solo', "gb800seplus", "gbultra", "gbultrase"): self.list.append(getConfigListEntry(_("Show clock in Deep Standby"), config.plugins.VFD_Giga.showClockDeepStandby)) if BOX in ('gb800se', 'gb800solo', "gb800seplus", "gbultra", "gbultrase", "gbtrio4k"): if config.plugins.VFD_Giga.showClock.value != "Off" or config.plugins.VFD_Giga.showClockDeepStandby.value == "True": self.list.append(getConfigListEntry(_("Time mode"), config.plugins.VFD_Giga.timeMode)) self.list.append(getConfigListEntry(_("Channel number with leading zeros"), config.plugins.VFD_Giga.channelnrformat)) self["config"].list = self.list self["config"].l.setList(self.list)
def GetConfigList(): optionList = [] optionList.append(getConfigListEntry(_("Use proxy server:"), config.plugins.iptvplayer.yify_proxy)) return optionList
def createConfig(self): self.enableEntry = getConfigListEntry(_("Enable PVR Descramble in standby"), config.plugins.pvrdesconvertsetup.activate)
def setScreen(self): self.list = [] if self.step == 1: self["introduction"].setText( _("The overscan wizard helps you to setup your TV in the correct way.\n\n" "For the majority of TV's, the factory default is to have overscan enabled. " "This means you are always watching a \"zoomed in\" picture instead of real HD, and parts of the user inferface (skin) may be invisible.\n\n" "The yellow area means a 5% border area of a full HD picture will be invisible.\n" "The green area means a 10% border area of a full HD picture will be invisible.\n\n" "In other words, if the yellow box meets all for sides of your screen, then you have at least 5% overscan on all sides.\n\n" "If you see the tips of all eight arrowheads, then your TV has overscan disabled.\n\n" "Test Pattern by TigerDave - www.tigerdave.com/ht_menu.htm")) self.yes_no = ConfigYesNo(default=True) self.list.append( getConfigListEntry(_("Did you see all eight arrow heads?"), self.yes_no)) self.save_new_position = False setPosition(0, 720, 0, 576) elif self.step == 2: self.Timer.stop() self["title"].setText(_("Overscan wizard")) self["introduction"].setText( _("It seems you did not see all the eight arrow heads. This means your TV is " "has overscan enabled, and is not configured properly.\n\n" "Please refer to your TVs manual to find how you can disable overscan on your TV. Look for terms like 'Just fit', 'Full width', etc. " "If you can't find it, ask other users at http://forums.openpli.org.\n\n" )) self.list.append( getConfigListEntry(_("Did you see all eight arrow heads?"), self.yes_no)) self.yes_no.value = True self.save_new_position = False setPosition(0, 720, 0, 576) elif self.step == 3: self["introduction"].setText( _("You did not see all eight arrow heads. This means your TV has overscan enabled " "and presents you with a zoomed-in picture, causing you to loose part of a full HD screen. In addition this " "you may also miss parts of the user interface, for example volume bars and more.\n\n" "You can now try to resize and change the position of the user interface until you see the eight arrow heads.\n\n" "When done press OK.\n\n")) self.dst_left = ConfigSlider( default=config.plugins.OSDPositionSetup.dst_left.value, increment=1, limits=(0, 720)) self.dst_right = ConfigSlider( default=config.plugins.OSDPositionSetup.dst_left.value + config.plugins.OSDPositionSetup.dst_width.value, increment=1, limits=(0, 720)) self.dst_top = ConfigSlider( default=config.plugins.OSDPositionSetup.dst_top.value, increment=1, limits=(0, 576)) self.dst_bottom = ConfigSlider( default=config.plugins.OSDPositionSetup.dst_top.value + config.plugins.OSDPositionSetup.dst_height.value, increment=1, limits=(0, 576)) self.list.append(getConfigListEntry(_("left"), self.dst_left)) self.list.append(getConfigListEntry(_("right"), self.dst_right)) self.list.append(getConfigListEntry(_("top"), self.dst_top)) self.list.append(getConfigListEntry(_("bottom"), self.dst_bottom)) setConfiguredPosition() elif self.step == 4: self["introduction"].setText( _("You did not see all eight arrow heads. This means your TV has overscan enabled " "and presents you with a zoomed-in picture, causing you to loose part of a full HD screen. In addition this " "you may also miss parts of the user interface, for example volume bars and more.\n\n" "Unfortunately, your model of receiver is not capable to adjust the dimensions of the user interface. " "If not everything is visible, you should change the installed skin to one that supports the overscan area of your TV.\n\n" "When you select a different skin, the user interface of your receiver will restart.\n\n" "Note: you can always start the Overscan wizard later, via\n\nmenu->installation->system->Overscan wizard" )) self.yes_no.value = False self.list.append( getConfigListEntry( _("Do you want to select a different skin?"), self.yes_no)) elif self.step == 5: self.Timer.stop() self["title"].setText(_("Overscan wizard")) self["introduction"].setText( _("The overscan wizard has been completed.\n\n" "Note: you can always start the Overscan wizard later, via\n\nMenu->Installation->System->Audio/Video" )) self.yes_no.value = True self.list.append( getConfigListEntry( _("Do you want to quit the overscan wizard?"), self.yes_no)) elif self.step == 6: config.skin.primary_skin.value = "PLi-HD/skin.xml" config.save() self["introduction"].setText( _("The user interface of the receiver will now restart to select the selected skin" )) quitMainloop(3) self["config"].list = self.list self["config"].l.setList(self.list) if self["config"].instance: self.__layoutFinished()
def updateList(self): self.ina_active = NoSave(ConfigYesNo(default="False")) self.ina_user = NoSave(ConfigText(fixed_size=False)) self.ina_pass = NoSave(ConfigText(fixed_size=False)) self.ina_alias = NoSave(ConfigText(fixed_size=False)) self.ina_period = NoSave(ConfigNumber()) self.ina_sysactive = NoSave(ConfigYesNo(default="False")) self.ina_system = NoSave(ConfigText(fixed_size=False)) if fileExists("/etc/rc3.d/S20inadyn-mt"): self.ina_active.value = True else: self.ina_active.value = False ina_active1 = getConfigListEntry(_("Activate Inadyn"), self.ina_active) self.list.append(ina_active1) if fileExists("/etc/inadyn.conf"): f = open("/etc/inadyn.conf", 'r') for line in f.readlines(): line = line.strip() if line.startswith('username '): line = line[9:] self.ina_user.value = line ina_user1 = getConfigListEntry(_("Username"), self.ina_user) self.list.append(ina_user1) elif line.startswith('password '): line = line[9:] self.ina_pass.value = line ina_pass1 = getConfigListEntry(_("Password"), self.ina_pass) self.list.append(ina_pass1) elif line.startswith('alias '): line = line[6:] self.ina_alias.value = line ina_alias1 = getConfigListEntry(_("Alias"), self.ina_alias) self.list.append(ina_alias1) elif line.startswith('update_period_sec '): line = int(line[18:]) line = (line / 60) self.ina_period.value = line ina_period1 = getConfigListEntry( _("Time Update in Minutes"), self.ina_period) self.list.append(ina_period1) elif line.startswith('dyndns_system ') or line.startswith( '#dyndns_system '): if line.startswith('#'): line = line[15:] self.ina_sysactive.value = False else: line = line[14:] self.ina_sysactive.value = True ina_sysactive1 = getConfigListEntry( _("Set System"), self.ina_sysactive) self.list.append(ina_sysactive1) self.ina_system.value = line ina_system1 = getConfigListEntry(_("System"), self.ina_system) self.list.append(ina_system1) f.close() self["config"].list = self.list self["config"].l.setList(self.list)
def initConfig(self): self.cfg_skin = getConfigListEntry(_('Select skin *Restart GUI Required'), cfg.skin) self.cfg_location = getConfigListEntry(_('playlists.txt location'), cfg.location) self.cfg_timeout = getConfigListEntry(_('Server timeout (seconds)'), cfg.timeout) self.cfg_livetype = getConfigListEntry(_('Default LIVE stream type'), cfg.livetype) self.cfg_vodtype = getConfigListEntry(_('Default VOD/SERIES stream type'), cfg.vodtype) self.cfg_catchuptype = getConfigListEntry(_('Default CATCHUP stream type'), cfg.vodtype) self.cfg_livepreview = getConfigListEntry(_('Preview LIVE streams in mini tv before playing'), cfg.livepreview) #self.cfg_stopstream = getConfigListEntry(_('Stop stream on back button'), cfg.stopstream) self.cfg_downloadlocation = getConfigListEntry(_('VOD download folder'), cfg.downloadlocation) self.cfg_parental = getConfigListEntry(_('Parental control'), cfg.parental) self.cfg_main = getConfigListEntry(_('Show in main menu *Restart GUI Required'), cfg.main) self.cfg_refreshTMDB = getConfigListEntry(_('Update VOD Movie Database information'), cfg.refreshTMDB) self.cfg_TMDBLanguage = getConfigListEntry(_('VOD Movie Database language'), cfg.TMDBLanguage) self.cfg_catchupstart = getConfigListEntry(_('Margin before catchup (mins)'), cfg.catchupstart) self.cfg_catchupend = getConfigListEntry(_('Margin after catchup (mins)'), cfg.catchupend) self.createSetup()
def createSetup(self): self.list = [] self.satfinderTunerEntry = getConfigListEntry(_("Tuner"), self.satfinder_scan_nims) self.list.append(self.satfinderTunerEntry) if nimmanager.nim_slots[int( self.satfinder_scan_nims.value)].isCompatible("DVB-S"): self.tuning_sat = self.scan_satselection[self.getSelectedSatIndex( self.feid)] if self.tuning_sat.value: self.satEntry = getConfigListEntry(_('Satellite'), self.tuning_sat) self.list.append(self.satEntry) self.typeOfTuningEntry = getConfigListEntry( _('Tune'), self.tuning_type) if len( nimmanager.getTransponders(int(self.tuning_sat.value)) ) < 1: # Only offer 'predefined transponder' if some transponders exist self.tuning_type.value = "single_transponder" else: self.list.append(self.typeOfTuningEntry) nim = nimmanager.nim_slots[self.feid] if self.tuning_type.value == "single_transponder": if nim.isCompatible("DVB-S2"): self.systemEntry = getConfigListEntry( _('System'), self.scan_sat.system) self.list.append(self.systemEntry) else: # downgrade to dvb-s, in case a -s2 config was active self.scan_sat.system.value = eDVBFrontendParametersSatellite.System_DVB_S self.frequencyEntry = getConfigListEntry( _('Frequency'), self.scan_sat.frequency) self.list.append(self.frequencyEntry) self.polarizationEntry = getConfigListEntry( _('Polarization'), self.scan_sat.polarization) self.list.append(self.polarizationEntry) self.symbolrateEntry = (getConfigListEntry( _('Symbol rate'), self.scan_sat.symbolrate)) self.list.append(self.symbolrateEntry) self.inversionEntry = getConfigListEntry( _('Inversion'), self.scan_sat.inversion) self.list.append(self.inversionEntry) if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S: self.fecEntry = getConfigListEntry( _("FEC"), self.scan_sat.fec) self.list.append(self.fecEntry) elif self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S2: self.fecEntry = getConfigListEntry( _("FEC"), self.scan_sat.fec_s2) self.list.append(self.fecEntry) self.modulationEntry = getConfigListEntry( _('Modulation'), self.scan_sat.modulation) self.list.append(self.modulationEntry) self.rolloffEntry = getConfigListEntry( _('Roll-off'), self.scan_sat.rolloff) self.list.append(self.rolloffEntry) self.pilotEntry = getConfigListEntry( _('Pilot'), self.scan_sat.pilot) self.list.append(self.pilotEntry) if nim.isMultistream(): self.list.append( getConfigListEntry(_('Input Stream ID'), self.scan_sat.is_id)) self.list.append( getConfigListEntry(_('PLS Mode'), self.scan_sat.pls_mode)) self.list.append( getConfigListEntry(_('PLS Code'), self.scan_sat.pls_code)) elif self.tuning_type.value == "predefined_transponder": if self.preDefTransponders is None: self.updatePreDefTransponders() self.list.append( getConfigListEntry(_("Transponder"), self.preDefTransponders)) elif nimmanager.nim_slots[int( self.satfinder_scan_nims.value)].isCompatible("DVB-C"): self.typeOfTuningEntry = getConfigListEntry( _('Tune'), self.tuning_type) if config.Nims[self.feid].cable.scan_type.value != "provider" or len( nimmanager.getTranspondersCable( int(self.satfinder_scan_nims.value)) ) < 1: # only show 'predefined transponder' if in provider mode and transponders exist self.tuning_type.value = "single_transponder" else: self.list.append(self.typeOfTuningEntry) if self.tuning_type.value == "single_transponder": self.list.append( getConfigListEntry(_("Frequency"), self.scan_cab.frequency)) self.list.append( getConfigListEntry(_("Inversion"), self.scan_cab.inversion)) self.list.append( getConfigListEntry(_("Symbol rate"), self.scan_cab.symbolrate)) self.list.append( getConfigListEntry(_("Modulation"), self.scan_cab.modulation)) self.list.append( getConfigListEntry(_("FEC"), self.scan_cab.fec)) elif self.tuning_type.value == "predefined_transponder": self.scan_nims.value = self.satfinder_scan_nims.value if self.CableTransponders is None: self.predefinedCabTranspondersList() self.list.append( getConfigListEntry(_('Transponder'), self.CableTransponders)) elif nimmanager.nim_slots[int( self.satfinder_scan_nims.value)].isCompatible("DVB-T"): self.typeOfTuningEntry = getConfigListEntry( _('Tune'), self.tuning_type) region = nimmanager.getTerrestrialDescription( int(self.satfinder_scan_nims.value)) if len( nimmanager.getTranspondersTerrestrial(region) ) < 1: # Only offer 'predefined transponder' if some transponders exist self.tuning_type.value = "single_transponder" else: self.list.append(self.typeOfTuningEntry) if self.tuning_type.value == "single_transponder": if nimmanager.nim_slots[int( self.satfinder_scan_nims.value)].isCompatible( "DVB-T2"): self.systemEntryTerr = getConfigListEntry( _('System'), self.scan_ter.system) self.list.append(self.systemEntryTerr) else: self.scan_ter.system.value = eDVBFrontendParametersTerrestrial.System_DVB_T self.typeOfInputEntry = getConfigListEntry( _("Use frequency or channel"), self.scan_input_as) if self.ter_channel_input: self.list.append(self.typeOfInputEntry) else: self.scan_input_as.value = self.scan_input_as.choices[0] if self.ter_channel_input and self.scan_input_as.value == "channel": channel = getChannelNumber( self.scan_ter.frequency.floatint * 1000, self.ter_tnumber) if channel: self.scan_ter.channel.removeNotifier( self.retuneTriggeredByConfigElement) self.scan_ter.channel.value = int( channel.replace("+", "").replace("-", "")) self.list.append( getConfigListEntry(_("Channel"), self.scan_ter.channel)) else: prev_val = self.scan_ter.frequency.floatint self.scan_ter.frequency.floatint = channel2frequency( self.scan_ter.channel.value, self.ter_tnumber) / 1000 if self.scan_ter.frequency.floatint == 474000: self.scan_ter.frequency.floatint = prev_val self.list.append( getConfigListEntry(_("Frequency"), self.scan_ter.frequency)) self.list.append( getConfigListEntry(_("Inversion"), self.scan_ter.inversion)) self.list.append( getConfigListEntry(_("Bandwidth"), self.scan_ter.bandwidth)) self.list.append( getConfigListEntry(_("Code rate HP"), self.scan_ter.fechigh)) self.list.append( getConfigListEntry(_("Code rate LP"), self.scan_ter.feclow)) self.list.append( getConfigListEntry(_("Modulation"), self.scan_ter.modulation)) self.list.append( getConfigListEntry(_("Transmission mode"), self.scan_ter.transmission)) self.list.append( getConfigListEntry(_("Guard interval"), self.scan_ter.guard)) self.list.append( getConfigListEntry(_("Hierarchy info"), self.scan_ter.hierarchy)) if self.scan_ter.system.value == eDVBFrontendParametersTerrestrial.System_DVB_T2: self.list.append( getConfigListEntry(_('PLP ID'), self.scan_ter.plp_id)) elif self.tuning_type.value == "predefined_transponder": self.scan_nims.value = self.satfinder_scan_nims.value if self.TerrestrialTransponders is None: self.predefinedTerrTranspondersList() self.list.append( getConfigListEntry(_('Transponder'), self.TerrestrialTransponders)) elif nimmanager.nim_slots[int( self.satfinder_scan_nims.value)].isCompatible("ATSC"): self.typeOfTuningEntry = getConfigListEntry( _('Tune'), self.tuning_type) if len( nimmanager.getTranspondersATSC( int(self.satfinder_scan_nims.value)) ) < 1: # only show 'predefined transponder' if transponders exist self.tuning_type.value = "single_transponder" else: self.list.append(self.typeOfTuningEntry) if self.tuning_type.value == "single_transponder": self.systemEntryATSC = getConfigListEntry( _("System"), self.scan_ats.system) self.list.append(self.systemEntryATSC) self.list.append( getConfigListEntry(_("Frequency"), self.scan_ats.frequency)) self.list.append( getConfigListEntry(_("Inversion"), self.scan_ats.inversion)) self.list.append( getConfigListEntry(_("Modulation"), self.scan_ats.modulation)) elif self.tuning_type.value == "predefined_transponder": #FIXME add region self.scan_nims.value = self.satfinder_scan_nims.value self.predefinedATSCTranspondersList() self.list.append( getConfigListEntry(_('Transponder'), self.ATSCTransponders)) self["config"].list = self.list self["config"].l.setList(self.list)
def __init__(self, session): self.session = session Screen.__init__(self, self.session) ProtectedScreen.__init__(self) # Lets get a list of elements for the config list self.list = [ getConfigListEntry(_("Enabled"), config.plugins.KiddyTimer.enabled), getConfigListEntry(_("PIN"), config.plugins.KiddyTimer.pin), getConfigListEntry(_("Don't monitor TV started before"), config.plugins.KiddyTimer.monitorStartTime), getConfigListEntry(_("Don't monitor TV started after"), config.plugins.KiddyTimer.monitorEndTime), getConfigListEntry(_("Style of timer"), config.plugins.KiddyTimer.timerStyle), getConfigListEntry( _("Timeout for activation dialog"), config.plugins.KiddyTimer.activationDialogTimeout) ] for i in range(0, 7): self.list.append( getConfigListEntry( KTglob.DAYNAMES[i], config.plugins.KiddyTimer.dayTimes[i].timeValue)) ConfigListScreen.__init__(self, self.list) self["config"].list = self.list self.skin_path = KTglob.plugin_path self.kiddyTimerStopped = False # Plugin Information self.remainingTime = config.plugins.KiddyTimer.remainingTime.value sRemainingTime = KTglob.getTimeFromSeconds(self.remainingTime, True) self["PluginInfo"] = Label( _("Plugin: %(plugin)s , Version: %(version)s") % dict(plugin=KTglob.PLUGIN_BASE, version=KTglob.PLUGIN_VERSION)) self["RemainingTime"] = Label(_("Remaining time: %s") % sRemainingTime) self["LastDayStarted"] = Label( _("Last day started: %s") % config.plugins.KiddyTimer.lastStartDay.getValue()) # BUTTONS self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("Save")) self["key_yellow"] = Button(_("Reset clock")) self["key_blue"] = Button(_("Move clock")) self["setupActions"] = NumberActionMap( ["SetupActions", "ColorActions"], { "save": self.save, "cancel": self.cancel, "green": self.save, "red": self.cancel, "ok": self.save, "blue": self.keyPositioner, "yellow": self.resetTimer }, -2)
def buildMy_rec(self, device): try: if device.find('1') > 1: device2 = device.replace('1', '') except: device2 = '' try: if device.find('2') > 1: device2 = device.replace('2', '') except: device2 = '' try: if device.find('3') > 1: device2 = device.replace('3', '') except: device2 = '' try: if device.find('4') > 1: device2 = device.replace('4', '') except: device2 = '' try: if device.find('5') > 1: device2 = device.replace('5', '') except: device2 = '' try: if device.find('6') > 1: device2 = device.replace('6', '') except: device2 = '' try: if device.find('7') > 1: device2 = device.replace('7', '') except: device2 = '' try: if device.find('8') > 1: device2 = device.replace('8', '') except: device2 = '' try: if device.find('p1') > 1: device2 = device.replace('p1', '') except: device2 = '' try: if device.find('p2') > 1: device2 = device.replace('p2', '') except: device2 = '' try: if device.find('p3') > 1: device2 = device.replace('p3', '') except: device2 = '' try: if device.find('p4') > 1: device2 = device.replace('p4', '') except: device2 = '' try: if device.find('p5') > 1: device2 = device.replace('p5', '') except: device2 = '' try: if device.find('p6') > 1: device2 = device.replace('p6', '') except: device2 = '' try: if device.find('p7') > 1: device2 = device.replace('p7', '') except: device2 = '' try: if device.find('p8') > 1: device2 = device.replace('p8', '') except: device2 = '' devicetype = path.realpath('/sys/block/' + device2 + '/device') d2 = device name = 'USB: ' mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/Infopanel/icons/dev_usbstick.png' if device2.startswith('mmcblk'): model = file('/sys/block/' + device2 + '/device/name').read() mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/Infopanel/icons/dev_mmc.png' name = 'MMC: ' else: model = file('/sys/block/' + device2 + '/device/model').read() model = str(model).replace('\n', '') des = '' print "test:" if devicetype.find('/devices/pci') != -1 or devicetype.find( 'ahci') != -1: name = _("HARD DISK: ") mypixmap = '/usr/lib/enigma2/python/Plugins/Extensions/Infopanel/icons/dev_hdd.png' name = name + model f = open('/proc/mounts', 'r') for line in f.readlines(): if line.find(device) != -1: parts = line.strip().split() d1 = parts[1] dtype = parts[2] break continue else: d1 = _("None") dtype = _("unavailable") f.close() f = open('/proc/partitions', 'r') for line in f.readlines(): if line.find(device) != -1: parts = line.strip().split() size = int(parts[2]) if (((float(size) / 1024) / 1024) / 1024) > 1: des = _("Size: ") + str( round((( (float(size) / 1024) / 1024) / 1024), 2)) + _("TB") elif ((size / 1024) / 1024) > 1: des = _("Size: ") + str((size / 1024) / 1024) + _("GB") else: des = _("Size: ") + str(size / 1024) + _("MB") else: try: size = file('/sys/block/' + device2 + '/' + device + '/size').read() size = str(size).replace('\n', '') size = int(size) except: size = 0 if ((((float(size) / 2) / 1024) / 1024) / 1024) > 1: des = _("Size: ") + str( round(((((float(size) / 2) / 1024) / 1024) / 1024), 2)) + _("TB") elif (((size / 2) / 1024) / 1024) > 1: des = _("Size: ") + str( ((size / 2) / 1024) / 1024) + _("GB") else: des = _("Size: ") + str((size / 2) / 1024) + _("MB") f.close() item = NoSave( ConfigSelection(default='/media/' + device, choices=[('/media/' + device, '/media/' + device), ('/media/hdd', '/media/hdd'), ('/media/hdd2', '/media/hdd2'), ('/media/hdd3', '/media/hdd3'), ('/media/usb', '/media/usb'), ('/media/usb2', '/media/usb2'), ('/media/usb3', '/media/usb3'), ('/media/mmc', '/media/mmc'), ('/media/mmc2', '/media/mmc2'), ('/media/mmc3', '/media/mmc3'), ('/usr', '/usr')])) if dtype == 'Linux': dtype = 'ext3' else: dtype = 'auto' item.value = d1.strip() text = name + ' ' + des + ' /dev/' + device res = getConfigListEntry(text, item, device, dtype) if des != '' and self.list.append(res): pass
def __init__(self, session): Screen.__init__(self, session) self.setup_title = _("Position Setup") # self.Console = Console() self["status"] = StaticText() self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("save")) self["key_yellow"] = StaticText(_("Defaults")) self["actions"] = ActionMap( ["SetupActions", "ColorActions"], { "cancel": self.keyCancel, "save": self.keySave, "left": self.keyLeft, "right": self.keyRight, "yellow": self.keyDefault, }, -2) self.onChangedEntry = [] self.list = [] ConfigListScreen.__init__(self, self.list, session=self.session, on_change=self.changedEntry) if SystemInfo["CanChangeOsdAlpha"] == True: self.list.append( getConfigListEntry( _("User interface visibility"), config.osd.alpha, _("This option lets you adjust the transparency of the user interface" ))) self.list.append( getConfigListEntry( _("Teletext base visibility"), config.osd.alpha_teletext, _("Base transparency for teletext, more options available within teletext screen." ))) self.list.append( getConfigListEntry( _("Web browser base visibility"), config.osd.alpha_webbrowser, _("Base transparency for OpenOpera web browser"))) if SystemInfo["CanChangeOsdPosition"] == True: self.list.append( getConfigListEntry( _("Move Left/Right"), config.osd.dst_left, _("Use the Left/Right buttons on your remote to move the user interface left/right" ))) self.list.append( getConfigListEntry( _("Width"), config.osd.dst_width, _("Use the Left/Right buttons on your remote to adjust the size of the user interface. Left button decreases the size, Right increases the size." ))) self.list.append( getConfigListEntry( _("Move Up/Down"), config.osd.dst_top, _("Use the Left/Right buttons on your remote to move the user interface up/down" ))) self.list.append( getConfigListEntry( _("Height"), config.osd.dst_height, _("Use the Left/Right buttons on your remote to adjust the size of the user interface. Left button decreases the size, Right increases the size." ))) self["config"].list = self.list self["config"].l.setList(self.list) self.onLayoutFinish.append(self.layoutFinished) if not self.selectionChanged in self["config"].onSelectionChanged: self["config"].onSelectionChanged.append(self.selectionChanged) self.selectionChanged()
def fillList(self, arg=None): streams = [] conflist = [] selectedidx = 0 self["key_blue"].setBoolean(False) subtitlelist = self.getSubtitleList() if self.settings.menupage.getValue() == PAGE_AUDIO: self.setTitle(_("Select audio track")) service = self.session.nav.getCurrentService() self.audioTracks = audio = service and service.audioTracks() n = audio and audio.getNumberOfTracks() or 0 if SystemInfo["CanDownmixAC3"]: self.settings.downmix = ConfigOnOff( default=config.av.downmix_ac3.value) self.settings.downmix.addNotifier(self.changeAC3Downmix, initial_call=False) conflist.append( getConfigListEntry(_("Multi channel downmix"), self.settings.downmix)) self["key_red"].setBoolean(True) if n > 0: self.audioChannel = service.audioChannel() if self.audioChannel: choicelist = [("0", _("left")), ("1", _("stereo")), ("2", _("right"))] self.settings.channelmode = ConfigSelection( choices=choicelist, default=str(self.audioChannel.getCurrentChannel())) self.settings.channelmode.addNotifier(self.changeMode, initial_call=False) conflist.append( getConfigListEntry(_("Channel"), self.settings.channelmode)) self["key_green"].setBoolean(True) else: conflist.append(('', )) self["key_green"].setBoolean(False) selectedAudio = self.audioTracks.getCurrentTrack() for x in range(n): number = str(x + 1) i = audio.getTrackInfo(x) languages = i.getLanguage().split('/') description = i.getDescription() or "" selected = "" language = "" if selectedAudio == x: selected = "X" selectedidx = x cnt = 0 for lang in languages: if cnt: language += ' / ' if LanguageCodes.has_key(lang): language += _(LanguageCodes[lang][0]) elif lang == "und": "" else: language += lang cnt += 1 streams.append( (x, "", number, description, language, selected)) else: streams = [] conflist.append(('', )) self["key_green"].setBoolean(False) if subtitlelist: self["key_yellow"].setBoolean(True) conflist.append( getConfigListEntry(_("To subtitle selection"), self.settings.menupage)) else: self["key_yellow"].setBoolean(False) conflist.append(('', )) from Components.PluginComponent import plugins from Plugins.Plugin import PluginDescriptor if hasattr(self.infobar, "runPlugin"): class PluginCaller: def __init__(self, fnc, *args): self.fnc = fnc self.args = args def __call__(self, *args, **kwargs): self.fnc(*self.args) self.Plugins = [(p.name, PluginCaller(self.infobar.runPlugin, p)) for p in plugins.getPlugins( where=PluginDescriptor.WHERE_AUDIOMENU)] if self.Plugins: self["key_blue"].setBoolean(True) if len(self.Plugins) > 1: conflist.append( getConfigListEntry(_("Audio plugins"), ConfigNothing())) self.plugincallfunc = [(x[0], x[1]) for x in self.Plugins] else: conflist.append( getConfigListEntry(self.Plugins[0][0], ConfigNothing())) self.plugincallfunc = self.Plugins[0][1] elif self.settings.menupage.getValue() == PAGE_SUBTITLES: self.setTitle(_("Subtitle selection")) conflist.append(('', )) conflist.append(('', )) self["key_red"].setBoolean(False) self["key_green"].setBoolean(False) idx = 0 for x in subtitlelist: number = str(x[1]) description = "?" language = "" selected = "" if self.selectedSubtitle and x[:4] == self.selectedSubtitle[:4]: selected = "X" selectedidx = idx try: if x[4] != "und": if LanguageCodes.has_key(x[4]): language = _(LanguageCodes[x[4]][0]) else: language = x[4] except: language = "" if x[0] == 0: description = "DVB" number = "%x" % (x[1]) elif x[0] == 1: description = "teletext" number = "%x%02x" % (x[3] and x[3] or 8, x[2]) elif x[0] == 2: types = (_("unknown"), _("embedded"), _("SSA file"), _("ASS file"), _("SRT file"), _("VOB file"), _("PGS file")) try: description = types[x[2]] except: description = _("unknown") + ": %s" % x[2] number = str(int(number) + 1) streams.append( (x, "", number, description, language, selected)) idx += 1 conflist.append( getConfigListEntry(_("To audio selection"), self.settings.menupage)) if self.infobar.selected_subtitle and self.infobar.selected_subtitle != ( 0, 0, 0, 0) and not ".DVDPlayer'>" in ` self.infobar `: self["key_blue"].setBoolean(True) conflist.append( getConfigListEntry(_("Subtitle Quickmenu"), ConfigNothing())) self["config"].list = conflist self["config"].l.setList(conflist) self["streams"].list = streams self["streams"].setIndex(selectedidx)
def __init__(self, session): Screen.__init__(self, session) self.session = session #Summary self.setup_title = _("Show Clock Setup") self.onChangedEntry = [] self.list = [ getConfigListEntry( _('Clock show timeout'), config.plugins.ShowClock.showTimeout, _('Specify how long (seconds) the clock shall be shown before it disappears. Set to "0" to show clock until hidden manually.' )), getConfigListEntry( _('Show clock und system startup?'), config.plugins.ShowClock.showOnBoot, _('Specify wheter the clock shall be shown at system start (will be hidden after the timeout defined above)' )), getConfigListEntry( _('Show in'), config.plugins.ShowClock.menu, _('Specify whether plugin shall show up in plugin menu or extensions menu (needs GUI restart)' )), getConfigListEntry( _('Name'), config.plugins.ShowClock.name, _('Specify plugin name to be used in menu (needs GUI restart).' )), getConfigListEntry( _("Description"), config.plugins.ShowClock.description, _('Specify plugin description to be used in menu (needs GUI restart).' )), ] ConfigListScreen.__init__(self, self.list, session=session, on_change=self.changed) def selectionChanged(): if self["config"].current: self["config"].current[1].onDeselect(self.session) self["config"].current = self["config"].getCurrent() if self["config"].current: self["config"].current[1].onSelect(self.session) for x in self["config"].onSelectionChanged: x() self["config"].selectionChanged = selectionChanged self["config"].onSelectionChanged.append(self.configHelp) # Initialize Buttons self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self["key_yellow"] = StaticText(_("Help")) self["key_blue"] = StaticText(_("Move clock")) self["help"] = StaticText() # Define Actions self["setupActions"] = ActionMap( ["SetupActions", "ColorActions"], { "red": self.keyCancel, "green": self.keySave, "yellow": self.keyHelp, "blue": self.keyMove, "cancel": self.keyCancel, "save": self.keySave, "ok": self.keySave, }, -2) # Trigger change self.changed() self.onLayoutFinish.append(self.setCustomTitle)
def buildConfigList(self): cfgList = [] cfgList.append( getConfigListEntry(_("Show list numbers:"), config.plugins.merlinEpgCenter.showListNumbers)) cfgList.append( getConfigListEntry(_("Show picons:"), config.plugins.merlinEpgCenter.showPicons)) if config.plugins.merlinEpgCenter.showPicons.value: cfgList.append( getConfigListEntry(_("Use picons (50x30) from:"), config.plugins.merlinEpgCenter.epgPaths)) cfgList.append( getConfigListEntry(_("Show service name:"), config.plugins.merlinEpgCenter.showServiceName)) if config.plugins.merlinEpgCenter.showServiceName.value: cfgList.append( getConfigListEntry( _("Adjust service name column width:"), config.plugins.merlinEpgCenter.serviceNameWidth)) cfgList.append( getConfigListEntry(_("Show duration:"), config.plugins.merlinEpgCenter.showDuration)) cfgList.append( getConfigListEntry( _("Show begin/remain times:"), config.plugins.merlinEpgCenter.showBeginRemainTime)) if config.plugins.merlinEpgCenter.showBeginRemainTime.value: cfgList.append( getConfigListEntry( _("Show multi colored begin/remain times:"), config.plugins.merlinEpgCenter.showColoredEpgTimes)) cfgList.append( getConfigListEntry(_("Increase list item height:"), config.plugins.merlinEpgCenter.listItemHeight)) cfgList.append( getConfigListEntry(_("Space between columns:"), config.plugins.merlinEpgCenter.columnSpace)) cfgList.append( getConfigListEntry(_("List style:"), config.plugins.merlinEpgCenter.listStyle)) cfgList.append( getConfigListEntry( _("Progress bar style:"), config.plugins.merlinEpgCenter.listProgressStyle)) cfgList.append( getConfigListEntry(_("Number of upcoming events to show:"), config.plugins.merlinEpgCenter.numNextEvents)) self.configList = cfgList
def createSetup(self): self.typeOfTuningEntry = None self.satEntry = None self.list = [] self.typeOfTuningEntry = getConfigListEntry(_('Tune'), tuning.type) self.list.append(self.typeOfTuningEntry) self.satEntry = getConfigListEntry(_('Satellite'), tuning.sat) self.list.append(self.satEntry) nim = nimmanager.nim_slots[self.feid] self.systemEntry = None if tuning.type.getValue() == "manual_transponder": if nim.isCompatible("DVB-S2"): self.systemEntry = getConfigListEntry(_('System'), self.scan_sat.system) self.list.append(self.systemEntry) else: # downgrade to dvb-s, in case a -s2 config was active self.scan_sat.system.value = eDVBFrontendParametersSatellite.System_DVB_S self.list.append( getConfigListEntry(_('Frequency'), self.scan_sat.frequency)) self.list.append( getConfigListEntry(_('Inversion'), self.scan_sat.inversion)) self.list.append( getConfigListEntry(_('Symbol rate'), self.scan_sat.symbolrate)) self.list.append( getConfigListEntry(_('Polarization'), self.scan_sat.polarization)) if self.scan_sat.system.getValue( ) == eDVBFrontendParametersSatellite.System_DVB_S: self.list.append( getConfigListEntry(_("FEC"), self.scan_sat.fec)) elif self.scan_sat.system.getValue( ) == eDVBFrontendParametersSatellite.System_DVB_S2: self.list.append( getConfigListEntry(_("FEC"), self.scan_sat.fec_s2)) self.modulationEntry = getConfigListEntry( _('Modulation'), self.scan_sat.modulation) self.list.append(self.modulationEntry) self.list.append( getConfigListEntry(_('Roll-off'), self.scan_sat.rolloff)) self.list.append( getConfigListEntry(_('Pilot'), self.scan_sat.pilot)) elif tuning.type.getValue() == "predefined_transponder": self.list.append( getConfigListEntry(_("Transponder"), tuning.transponder)) self["config"].list = self.list self["config"].l.setList(self.list)
def changeTimerType(self): self.timerentry_justplay.selectNext() self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay) self["config"].invalidate(self.timerJustplayEntry) self.createSetup("config")
def createSetup(self): self.list = [] if fileExists("/proc/stb/encoder/0/vcodec"): self.list.append( getConfigListEntry(_("Bitrate in bits"), config.plugins.transcodingsetup.bitrate)) self.list.append( getConfigListEntry(_("Framerate"), config.plugins.transcodingsetup.framerate)) self.list.append( getConfigListEntry(_("Resolution"), config.plugins.transcodingsetup.resolution)) self.list.append( getConfigListEntry(_("Video codec"), config.plugins.transcodingsetup.vcodec)) self.list.append( getConfigListEntry( _("Aspect Ratio"), config.plugins.transcodingsetup.aspectratio)) self.list.append( getConfigListEntry(_("Interlaced"), config.plugins.transcodingsetup.interlaced)) elif getMachineBuild() in ('ew7356', 'formuler1', 'formuler1tc'): self.list.append( getConfigListEntry(_("Bitrate in bits"), config.plugins.transcodingsetup.bitrate)) self.list.append( getConfigListEntry(_("Framerate"), config.plugins.transcodingsetup.framerate)) else: self.list.append( getConfigListEntry(_("Bitrate in bits"), config.plugins.transcodingsetup.bitrate)) self.list.append( getConfigListEntry(_("Framerate"), config.plugins.transcodingsetup.framerate)) self.list.append( getConfigListEntry(_("Resolution"), config.plugins.transcodingsetup.resolution)) self.list.append( getConfigListEntry( _("Aspect Ratio"), config.plugins.transcodingsetup.aspectratio)) self.list.append( getConfigListEntry(_("Interlaced"), config.plugins.transcodingsetup.interlaced)) self["config"].list = self.list self["config"].l.setList(self.list)
def _getConfig(self): # Name, configElement, HelpTxt, reloadConfig self.list = [] self.list.append( getConfigListEntry( _("Refresh EPG automatically"), config.plugins.epgrefresh.enabled, _("Unless this is enabled, EPGRefresh won't automatically run but needs to be explicitly started by the yellow button in this menu." ), True)) if config.plugins.epgrefresh.enabled.value: # temporary until new mode is successfully tested self.list.append( getConfigListEntry( _("Use time-based duration to stay on service"), config.plugins.epgrefresh.usetimebased, _("Duration to stay can be automatically detected by enigma2 or manually set by the user" ), True)) if config.plugins.epgrefresh.usetimebased.value: self.list.append( getConfigListEntry( _("Duration to stay on service (seconds)"), config.plugins.epgrefresh.interval_seconds, _("This is the duration each service/channel will stay active during a refresh." ), False)) self.list.append( getConfigListEntry( _("EPG refresh auto-start earliest (hh:mm)"), config.plugins.epgrefresh.begin, _("An automated refresh will start after this time of day, but before the time specified in next setting." ), False)) self.list.append( getConfigListEntry( _("EPG refresh auto-start latest (hh:mm)"), config.plugins.epgrefresh.end, _("An automated refresh will start before this time of day, but after the time specified in previous setting." ), False)) self.list.append( getConfigListEntry( _("Delay if not in standby (minutes)"), config.plugins.epgrefresh.delay_standby, _("If the receiver currently isn't in standby, this is the duration which EPGRefresh will wait before retry." ), False)) self.list.append( getConfigListEntry( _("Refresh EPG using"), config.plugins.epgrefresh.adapter, _("If you want to refresh the EPG in background, you can choose the method which best suits your needs here, e.g. hidden, fake reocrding or regular Picture in Picture." ), False)) self.list.append( getConfigListEntry( _("Show Advanced Options"), NoSave(config.plugins.epgrefresh.showadvancedoptions), _("Display more Options"), True)) if config.plugins.epgrefresh.showadvancedoptions.value: if config.ParentalControl.configured.value and config.ParentalControl.servicepinactive.value: self.list.append( getConfigListEntry( _("Skip protected Services"), config.plugins.epgrefresh.skipProtectedServices, _("Should protected services be skipped if refresh was started in interactive-mode?" ), False)) self.list.append( getConfigListEntry( _("Show Setup in extension menu"), config.plugins.epgrefresh.show_in_extensionsmenu, _("Enable this to be able to access the EPGRefresh configuration from within the extension menu." ), False)) self.list.append( getConfigListEntry( _("Show 'EPGRefresh Start now' in extension menu"), config.plugins.epgrefresh.show_run_in_extensionsmenu, _("Enable this to be able to start the EPGRefresh from within the extension menu." ), False)) self.list.append( getConfigListEntry( _("Show popup when refresh starts and ends"), config.plugins.epgrefresh.enablemessage, _("This setting controls whether or not an informational message will be shown at start and completion of refresh." ), False)) self.list.append( getConfigListEntry( _("Wake up from standby for EPG refresh"), config.plugins.epgrefresh.wakeup, _("If this is enabled, the plugin will wake up the receiver from standby if possible. Otherwise it needs to be switched on already." ), False)) self.list.append( getConfigListEntry( _("Force scan even if receiver is in use"), config.plugins.epgrefresh.force, _("This setting controls whether or not the refresh will be initiated even though the receiver is active (either not in standby or currently recording)." ), False)) self.list.append( getConfigListEntry( _("After EPG refresh"), config.plugins.epgrefresh.afterevent, _("This setting controls whether the receiver should be set to standby after refresh is completed." ), True)) if config.plugins.epgrefresh.afterevent.value: self.list.append( getConfigListEntry( _("Don't shutdown after manual abort of automated refresh" ), config.plugins.epgrefresh.dontshutdownonabort, _("Activate this setting to avoid shutdown after manual abort of automated refresh" ), False)) self.list.append( getConfigListEntry( _("Force save EPG.db"), config.plugins.epgrefresh.epgsave, _("If this is enabled, the Plugin save the epg.db /etc/enigma2/epg.db." ), False)) self.list.append( getConfigListEntry( _("Reset") + " " + _("EPG.db"), config.plugins.epgrefresh.epgreset, _("If this is enabled, the Plugin shows the Reset EPG.db function." ), False)) try: # try to import autotimer module to check for its existence from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer self.list.append( getConfigListEntry( _("Inherit Services from AutoTimer"), config.plugins.epgrefresh.inherit_autotimer, _("Extend the list of services to refresh by those your AutoTimers use?" ), True)) self.list.append( getConfigListEntry( _("Run AutoTimer after refresh"), config.plugins.epgrefresh.parse_autotimer, _("After a successful refresh the AutoTimer will automatically search for new matches if this is enabled. The options 'Ask*' has only affect on a manually refresh. If EPG-Refresh was called in background the default-Answer will be executed!" ), False)) except ImportError as ie: print("[EPGRefresh] AutoTimer Plugin not installed:", ie) self["config"].list = self.list self["config"].setList(self.list)
def createSetup(self): self.list = [] self.list.append(getConfigListEntry(_("General"))) self.list.append( getConfigListEntry(_("AC3 default"), config.av.defaultac3)) self.list.append( getConfigListEntry(_("AC3 downmix"), config.av.downmix_ac3, True)) self.list.append( getConfigListEntry(_("General AC3 Delay"), config.av.generalAC3delay)) self.list.append( getConfigListEntry(_("General PCM Delay"), config.av.generalPCMdelay)) try: self.list.append( getConfigListEntry(_("Volume step size (%)"), config.audio.volume_stepsize)) except: pass self.list.append(getConfigListEntry(_("Codecs"))) if model in ["one", "two"]: if config.av.downmix_ac3.value: self.list.append( getConfigListEntry( "Dolby Digital/Dolby Digital Plus/Dolby Atmos", config.av.ac3_downmix)) else: self.list.append( getConfigListEntry( "Dolby Digital/Dolby Digital Plus/Dolby Atmos", config.av.ac3_passthrough)) self.list.append(getConfigListEntry("DTS", config.av.dts_support)) self.list.append( getConfigListEntry("DTS-HD HR/DTS-HD MA/DTS:X", config.av.dtshd_support)) self.list.append( getConfigListEntry("Dolby TrueHD/Dolby Atmos", config.av.truehd_support)) else: self.list.append(getConfigListEntry("Dolby Digital", config.av.ac3)) self.list.append( getConfigListEntry("Dolby Digital Plus/Dolby Atmos", config.av.ac3plus)) self.list.append( getConfigListEntry("Dolby TrueHD/Dolby Atmos", config.av.truehd)) self.list.append( getConfigListEntry("DTS/DTS-HD HR/DTS-HD MA/DTS:X", config.av.dtshd)) self.list.append(getConfigListEntry("AAC/HE-AAC", config.av.aac)) self.list.append(getConfigListEntry("WMA Pro", config.av.wmapro)) self["config"].list = self.list self["config"].l.setList(self.list)
def createSetup(self): level = config.usage.setup_level.index self.list = [ getConfigListEntry(_("Video output"), config.av.videoport, _("Configures which video output connector will be used.")) ] # if we have modes for this port: if config.av.videoport.value in config.av.videomode: # add mode- and rate-selection: self.list.append(getConfigListEntry(pgettext("Video output mode", "Mode"), config.av.videomode[config.av.videoport.value], _("Configure the video output mode (or resolution)."))) if config.av.videomode[config.av.videoport.value].value == 'PC': self.list.append(getConfigListEntry(_("Resolution"), config.av.videorate[config.av.videomode[config.av.videoport.value].value], _("Configure the screen resolution in PC output mode."))) else: self.list.append(getConfigListEntry(_("Refresh rate"), config.av.videorate[config.av.videomode[config.av.videoport.value].value], _("Configure the refresh rate of the screen."))) port = config.av.videoport.value if port not in config.av.videomode: mode = None else: mode = config.av.videomode[port].value # some modes (720p, 1080i) are always widescreen. Don't let the user select something here, "auto" is not what he wants. force_wide = self.hw.isWidescreenMode(port, mode) if not force_wide: self.list.append(getConfigListEntry(_("Aspect ratio"), config.av.aspect, _("Configure the aspect ratio of the screen."))) if force_wide or config.av.aspect.value in ("16_9", "16_10"): self.list.extend(( getConfigListEntry(_("Display 4:3 content as"), config.av.policy_43, _("When the content has an aspect ratio of 4:3, choose whether to scale/stretch the picture.")), getConfigListEntry(_("Display >16:9 content as"), config.av.policy_169, _("When the content has an aspect ratio of 16:9, choose whether to scale/stretch the picture.")) )) elif config.av.aspect.value == "4_3": self.list.append(getConfigListEntry(_("Display 16:9 content as"), config.av.policy_169, _("When the content has an aspect ratio of 16:9, choose whether to scale/stretch the picture."))) if config.av.videoport.value == "DVI": if level >= 1: if SystemInfo["HasColorspace"]: self.list.append(getConfigListEntry(_("HDMI Colorspace"), config.av.hdmicolorspace, _("This option allows you to configure the Colorspace from Auto to RGB"))) if SystemInfo["HasColordepth"]: self.list.append(getConfigListEntry(_("HDMI Colordepth"), config.av.hdmicolordepth, _("This option allows you to configure the Colordepth for UHD"))) if SystemInfo["HasColorimetry"]: self.list.append(getConfigListEntry(_("HDMI Colorimetry"), config.av.hdmicolorimetry, _("This option allows you to configure the Colorimetry for HDR."))) if SystemInfo["HasHdrType"]: self.list.append(getConfigListEntry(_("HDMI HDR Type"), config.av.hdmihdrtype, _("This option allows you to configure the HDR type."))) if SystemInfo["HasHDMIpreemphasis"]: self.list.append(getConfigListEntry(_("HDMI use pre-emphasis"), config.av.hdmipreemphasis, _("This option can be useful for long HDMI cables."))) if SystemInfo["HasBypassEdidChecking"]: self.list.append(getConfigListEntry(_("HDMI bypass EDID checking"), config.av.bypassEdidChecking, _("Configure if the HDMI EDID checking should be bypassed as this might solve issue with some TVs."))) self.list.append(getConfigListEntry(_("HDMI allow unsupported modes"), config.av.edid_override, _("This option allows to select video modes even if they are not reported as supported from HDMI-EDID."))) if SystemInfo["HDRSupport"]: self.list.append(getConfigListEntry(_("HLG support"), config.av.hlg_support,_("This option allows you to force the HLG modes for UHD"))) self.list.append(getConfigListEntry(_("HDR10 support"), config.av.hdr10_support,_("This option allows you to force the HDR10 modes for UHD"))) self.list.append(getConfigListEntry(_("Allow 12bit"), config.av.allow_12bit,_("This option allows you to enable or disable the 12 bit color mode"))) self.list.append(getConfigListEntry(_("Allow 10bit"), config.av.allow_10bit,_("This option allows you to enable or disable the 10 bit color mode"))) if config.av.videoport.value == "Scart": self.list.append(getConfigListEntry(_("Color format"), config.av.colorformat, _("Configure which color format should be used on the SCART output."))) if level >= 1: self.list.append(getConfigListEntry(_("WSS on 4:3"), config.av.wss, _("When enabled, content with an aspect ratio of 4:3 will be stretched to fit the screen."))) if SystemInfo["ScartSwitch"]: self.list.append(getConfigListEntry(_("Auto scart switching"), config.av.vcrswitch, _("When enabled, your receiver will detect activity on the VCR SCART input."))) if SystemInfo["CanChangeOsdAlpha"]: self.list.append(getConfigListEntry(_("OSD transparency"), config.av.osd_alpha, _("Configure the transparency of the OSD."))) if not isinstance(config.av.scaler_sharpness, ConfigNothing): self.list.append(getConfigListEntry(_("Scaler sharpness"), config.av.scaler_sharpness, _("Configure the sharpness of the video scaling."))) self["config"].list = self.list self["config"].l.setList(self.list)
def createSetup(self, widget): self.list = [] self.entryFallbackTimer = getConfigListEntry(_("Fallback Timer"), self.timerentry_fallback) if config.usage.remote_fallback_external_timer.value and config.usage.remote_fallback.value and not hasattr( self, "timerentry_remote"): self.list.append(self.entryFallbackTimer) self.entryName = getConfigListEntry(_("Name"), self.timerentry_name) self.list.append(self.entryName) self.entryDescription = getConfigListEntry(_("Description"), self.timerentry_description) self.list.append(self.entryDescription) self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_("Repeat type"), self.timerentry_type) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry( _("Starting on"), self.timerentry_repeatedbegindate) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append( getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append( getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append( getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append( getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append( getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append( getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append( getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append( getConfigListEntry(_("Sunday"), self.timerentry_day[6])) if self.timerentry_justplay.value != "zap": self.list.append( getConfigListEntry( _("Rename name and description for new events"), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("Start time"), self.timerentry_starttime) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime) self.entryZapWakeup = getConfigListEntry( _("Wakeup receiver for start timer"), self.timerentry_zapwakeup) if self.timerentry_justplay.value == "zap": self.list.append(self.entryZapWakeup) if SystemInfo["PIPAvailable"]: self.list.append( getConfigListEntry(_("Use as PiP if possible"), self.timerentry_pipzap)) self.list.append(self.entryShowEndTime) self["key_blue"].setText(_("Wakeup type")) else: self["key_blue"].setText("") self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service) self.list.append(self.channelEntry) self.dirname = getConfigListEntry( _("Location"), self.timerentry_fallbackdirname ) if self.timerentry_fallback.value and self.timerentry_fallbackdirname.value else getConfigListEntry( _("Location"), self.timerentry_dirname) if config.usage.setup_level.index >= 2 and ( self.timerentry_fallback.value and self.timerentry_fallbackdirname.value or self.timerentry_dirname.value): # expert+ self.list.append(self.dirname) self.conflictDetectionEntry = getConfigListEntry( _("Enable timer conflict detection"), self.timerentry_conflictdetection) if not self.timerentry_fallback.value: self.list.append(self.conflictDetectionEntry) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset) if self.timerentry_justplay.value != "zap" and not self.timerentry_fallback.value: if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append( getConfigListEntry(_("After event"), self.timerentry_afterevent)) self.list.append( getConfigListEntry(_("Recording type"), self.timerentry_recordingtype)) self[widget].list = self.list self[widget].l.setList(self.list)
def fillList(self): list = self.list del list[:] print "self.list", list if self.subtitlesEnabled(): list.append( getConfigListEntry(_("Disable Subtitles"), ConfigNothing(), None)) sel = self.infobar.selected_subtitle else: sel = None for x in self.getSubtitleList(): if sel and sel[:4] == x[:4]: #ignore Language code in compare text = _("Running") else: text = _("Enable") if x[0] == 0: if LanguageCodes.has_key(x[4]): list.append( getConfigListEntry( text + " DVB " + LanguageCodes[x[4]][0], ConfigNothing(), x)) else: list.append( getConfigListEntry(text + " DVB " + x[4], ConfigNothing(), x)) elif x[0] == 1: if x[4] == 'und': #undefined list.append( getConfigListEntry( text + " TTX " + _("Page") + " %x%02x" % (x[3], x[2]), ConfigNothing(), x)) else: if LanguageCodes.has_key(x[4]): list.append( getConfigListEntry( text + " TTX " + _("Page") + " %x%02x" % (x[3], x[2]) + " " + LanguageCodes[x[4]][0], ConfigNothing(), x)) else: list.append( getConfigListEntry( text + " TTX " + _("Page") + " %x%02x" % (x[3], x[2]) + " " + x[4], ConfigNothing(), x)) elif x[0] == 2: types = (" UTF-8 text ", " SSA / AAS ", " .SRT file ") if x[4] == 'und': #undefined list.append( getConfigListEntry( text + types[x[2]] + _("Subtitles") + " %d" % x[1], ConfigNothing(), x)) else: if LanguageCodes.has_key(x[4]): list.append( getConfigListEntry( text + types[x[2]] + _("Subtitles") + ' ' + LanguageCodes[x[4]][0], ConfigNothing(), x)) else: list.append( getConfigListEntry( text + types[x[2]] + _("Subtitles") + " %d " % x[1] + x[4], ConfigNothing(), x)) # return _("Disable subtitles") self["config"].list = list self["config"].l.setList(list)
class AutomaticCleanupSetup(Screen, ConfigListScreen): # config skin = """ <screen name="SystemCleanup" position="center,center" size="630,315" title="Automatic System Cleanup Setup" > <ePixmap pixmap="skin_default/buttons/red.png" position="5,5" zPosition="0" size="140,40" transparent="1" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/green.png" position="165,5" zPosition="0" size="140,40" transparent="1" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/yellow.png" position="325,5" zPosition="0" size="140,40" transparent="1" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/blue.png" position="485,5" zPosition="0" size="140,40" transparent="1" alphatest="on" /> <widget render="Label" source="key_red" position="5,5" size="140,40" zPosition="2" valign="center" halign="center" backgroundColor="red" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" /> <widget render="Label" source="key_green" position="165,5" size="140,40" zPosition="2" valign="center" halign="center" backgroundColor="red" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" /> <widget render="Label" source="key_yellow" position="325,5" size="140,40" zPosition="2" valign="center" halign="center" backgroundColor="red" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" /> <widget name="config" position="5,60" size="620,155" scrollbarMode="showOnDemand" /> <ePixmap pixmap="skin_default/div-h.png" position="0,220" zPosition="1" size="630,2" /> <widget source="help" render="Label" position="5,235" size="620,75" font="Regular;21" /> </screen>""" def __init__(self, session): Screen.__init__(self, session) #Summary self.setup_title = _("Automatic System Cleanup Setup") self.onChangedEntry = [] self.list = [ getConfigListEntry(_("Delete system setting backups"), config.plugins.AutomaticCleanup.deleteSettingsOlderThan, _("Specify, how long system setting backups shall be kept at most (even if maximum number is not yet exceeded). Latest backup will be kept anyway!")), getConfigListEntry(_("Maximum number of system setting backups"), config.plugins.AutomaticCleanup.keepSettings, _("Maximum number of system setting backups to keep, regardless of retention period.")), getConfigListEntry(_("Delete orphaned movie files"), config.plugins.AutomaticCleanup.deleteOrphanedMovieFiles, _("If enabled, orphaned movie files will be automatically deleted from movie directories.")), getConfigListEntry(_("Delete crashlogs"), config.plugins.AutomaticCleanup.deleteCrashlogsOlderThan, _('Sorry, this feature is not available due to license reasons. To get the full version, please search the web for "dreambox automaticcleanup."')), getConfigListEntry(_("Maximum number of crashlogs"), config.plugins.AutomaticCleanup.keepCrashlogs, _('Sorry, this feature is not available due to license reasons. To get the full version, please search the web for "dreambox automaticcleanup."')), ] try: # try to import EMC module to check for its existence from Plugins.Extensions.EnhancedMovieCenter.EnhancedMovieCenter import EnhancedMovieCenterMenu self.EMC_timer_autocln = config.EMC.timer_autocln.value except ImportError, ie: print pluginPrintname, "EMC not installed:", ie self.EMC_timer_autocln = False if self.EMC_timer_autocln: # Timer cleanup enabled in EMC plugin? self.list.append(getConfigListEntry(_("Delete timerlist entries"), config.plugins.AutomaticCleanup.deleteTimersOlderThan, _("Timerlist cleanup is enabled in EMC plugin! To avoid crashes, we won't delete entries whilst this option is enabled in EMC."))) # Avoid duplicate cleanup else: self.list.append(getConfigListEntry(_("Delete timerlist entries"), config.plugins.AutomaticCleanup.deleteTimersOlderThan, _("Specify, how long expired timer list entries shall be kept at most. Deactivated repeat timer entries won't be deleted ever."))) ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changed) def selectionChanged(): if self["config"].current: self["config"].current[1].onDeselect(self.session) self["config"].current = self["config"].getCurrent() if self["config"].current: self["config"].current[1].onSelect(self.session) for x in self["config"].onSelectionChanged: x() self["config"].selectionChanged = selectionChanged self["config"].onSelectionChanged.append(self.configHelp) # Initialize Buttons self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self["key_yellow"] = StaticText(_("Help")) self["help"] = StaticText() # Define Actions self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], { "red": self.keyCancel, "green": self.keySave, "yellow": self.keyHelp, "cancel": self.keyCancel, "save": self.keySave, "ok": self.keySave, }, -2) # Trigger change self.changed() self.onLayoutFinish.append(self.setCustomTitle)
def createSetup(self): self.list = [ getConfigListEntry(_("Enable Autoresolution"), config.plugins.autoresolution.enable) ] if config.plugins.autoresolution.enable.value: if usable: self.list.append( getConfigListEntry(_("Mode"), config.plugins.autoresolution.mode)) if config.plugins.autoresolution.mode.value == "manual": for mode, label in resolutions: self.list.append( getConfigListEntry( label, videoresolution_dictionary[mode])) if "720p" in config.av.videorate: self.list.append( getConfigListEntry( _("Refresh Rate") + " 720p", config.av.videorate["720p"])) if "1080i" in config.av.videorate: self.list.append( getConfigListEntry( _("Refresh Rate") + " 1080i", config.av.videorate["1080i"])) if "1080p" in config.av.videorate: self.list.append( getConfigListEntry( _("Refresh Rate") + " 1080p", config.av.videorate["1080p"])) if "2160p" in config.av.videorate: self.list.append( getConfigListEntry( _("Refresh Rate") + " 2160p", config.av.videorate["2160p"])) self.list.extend( (getConfigListEntry( _("Show info screen"), config.plugins.autoresolution.showinfo), getConfigListEntry( _("Delay x seconds after service started"), config.plugins.autoresolution.delay_switch_mode), getConfigListEntry( _("Running in testmode"), config.plugins.autoresolution.testmode), getConfigListEntry( _("Deinterlacer mode for interlaced content"), config.plugins.autoresolution.deinterlacer), getConfigListEntry( _("Deinterlacer mode for progressive content"), config.plugins.autoresolution. deinterlacer_progressive), getConfigListEntry( _("Force set progressive for stream/video content" ), config.plugins.autoresolution. force_progressive_mode))) if HasHdrType: self.list.append( getConfigListEntry( _("Smart HDR type (set 'auto' HDMI HDR type)"), config.plugins.autoresolution.hdmihdrtype)) if HasColorimetry and config.plugins.autoresolution.hdmihdrtype.value: self.list.append( getConfigListEntry( _("Separate colorimetry for HDR (set 'auto' HDMI Colorimetry)" ), config.plugins.autoresolution. hdmicolorimetry)) else: self.list.append( getConfigListEntry( _("Lock timeout"), config.plugins.autoresolution.lock_timeout)) self.list.append( getConfigListEntry( _("Ask before changing videomode"), config.plugins.autoresolution.ask_apply_mode)) if config.plugins.autoresolution.ask_apply_mode.value: self.list.append( getConfigListEntry( _("Message timeout"), config.plugins.autoresolution.ask_timeout)) self.list.append( getConfigListEntry( _("Use 60HZ instead 30HZ"), config.plugins.autoresolution.auto_30_60)) self.list.append( getConfigListEntry( _("Alternative resolution when native not supported" ), config.plugins.autoresolution. auto_24_30_alternative)) else: self.list.append( getConfigListEntry( _("Autoresolution is not working in Scart/DVI-PC Mode" ), ConfigNothing())) elif config.av.videoport.value not in ('DVI-PC', 'Scart'): self.list.append( getConfigListEntry( _("Show 'Manual resolution' in extensions menu"), config.plugins.autoresolution.manual_resolution_ext_menu)) if config.plugins.autoresolution.manual_resolution_ext_menu.value: self.list.append( getConfigListEntry( _("Return back without confirmation after 10 sec."), config.plugins.autoresolution.ask_apply_mode)) self["config"].list = self.list self["config"].setList(self.list)
def createSetup(self): level = config.usage.setup_level.index self.list = [ ] if SystemInfo["CanDownmixAC3"]: self.list.append(getConfigListEntry(_("AC3 downmix"), config.av.downmix_ac3, _("Configure whether multi channel sound tracks should be downmixed to stereo."))) if SystemInfo["CanDownmixDTS"]: self.list.append(getConfigListEntry(_("DTS downmix"), config.av.downmix_dts, _("Configure whether multi channel sound tracks should be downmixed to stereo."))) if level >= 1: self.list.extend(( getConfigListEntry(_("General AC3 delay"), config.av.generalAC3delay, _("Configure the general audio delay of Dolby Digital sound tracks.")), getConfigListEntry(_("General PCM delay"), config.av.generalPCMdelay, _("Configure the general audio delay of stereo sound tracks.")) )) if SystemInfo["CanDownmixAAC"]: self.list.append(getConfigListEntry(_("AAC downmix"), config.av.downmix_aac, _("Configure whether multi channel sound tracks should be downmixed to stereo."))) if SystemInfo["CanDownmixAACPlus"]: self.list.append(getConfigListEntry(_("AAC plus downmix"), config.av.downmix_aacplus, _("Configure whether multi channel sound tracks should be downmixed to stereo."))) if SystemInfo["CanDownmixAC3Plus"]: self.list.append(getConfigListEntry(_("AC3 plus downmix"), config.av.downmix_ac3plus, _("Configure whether multi channel sound tracks should be downmixed to stereo."))) if SystemInfo["CanDownmixDTSHD"]: self.list.append(getConfigListEntry(_("DTS HD downmix"), config.av.downmix_dtshd, _("Configure whether DTS-HD channel sound tracks should be downmixed or transcoded."))) if SystemInfo["CanDownmixWMApro"]: self.list.append(getConfigListEntry(_("WMA pro downmix"), config.av.downmix_wmapro, _("Configure whether WMA pro channel sound tracks should be downmixed or transcoded."))) if SystemInfo["HDMIAudioSource"]: self.list.append(getConfigListEntry(_("HDMI audio source"), config.av.hdmi_audio_source, _("Choose whether multi channel sound tracks should be convert to PCM or SPDIF."))) if SystemInfo["CanAACTranscode"]: self.list.append(getConfigListEntry(_("AAC transcoding"), config.av.transcode_aac, _("Configure whether AAC sound tracks should be transcoded."))) if SystemInfo["HasMultichannelPCM"]: self.list.append(getConfigListEntry(_("Multichannel PCM"), config.av.multichannel_pcm, _("Configure whether multi channel PCM sound should be enabled."))) if SystemInfo["HasAutoVolume"] or SystemInfo["HasAutoVolumeLevel"]: self.list.append(getConfigListEntry(_("Audio auto volume level"), SystemInfo["HasAutoVolume"] and config.av.autovolume or config.av.autovolumelevel, _("This option allows you can to set the auto volume level."))) if SystemInfo["Has3DSurround"]: self.list.append(getConfigListEntry(_("3D surround"), config.av.surround_3d, _("This option allows you to enable 3D surround sound."))) if SystemInfo["Has3DSpeaker"] and config.av.surround_3d.value != "none": self.list.append(getConfigListEntry(_("3D surround speaker position"), config.av.speaker_3d, _("This option allows you to change the virtuell loadspeaker position."))) if SystemInfo["Has3DSurroundSpeaker"]: self.list.append(getConfigListEntry(_("3D surround speaker position"), config.av.surround_3d_speaker, _("This option allows you to disable or change the virtuell loadspeaker position."))) if SystemInfo["Has3DSurroundSoftLimiter"] and config.av.surround_3d_speaker.value != "disabled": self.list.append(getConfigListEntry(_("3D surround softlimiter"), config.av.surround_softlimiter_3d, _("This option allows you to enable 3D surround softlimiter."))) self["config"].list = self.list self["config"].l.setList(self.list)
def GetConfigList(): optionList = [] optionList.append( getConfigListEntry(_("Localization"), config.plugins.iptvplayer.dailymotion_localization)) return optionList
def createSetup(self, widget): self.list = [] self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay, _("Chose between record and ZAP.")) self.list.append(self.timerJustplayEntry) self.entryName = getConfigListEntry(_("Name"), self.timerentry_name, _("Set the name the recording will get.")) self.list.append(self.entryName) self.entryDescription = getConfigListEntry(_("Description"), self.timerentry_description, _("Set the description of the recording.")) self.list.append(self.entryDescription) self.timerTypeEntry = getConfigListEntry(_("Repeat type"), self.timerentry_type, _("A repeating timer or just once?")) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated, _("Choose between Daily, Weekly, Weekdays or user defined.")) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry(_("Starting on"), self.timerentry_repeatedbegindate, _("Set the date the timer must start.")) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append(getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append(getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append(getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append(getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append(getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append(getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append(getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append(getConfigListEntry(_("Sunday"), self.timerentry_day[6])) if self.timerentry_justplay.value != "zap": self.list.append(getConfigListEntry(_("Rename name and description for new events"), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date, _("Set the date the timer must start.")) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("Start time"), self.timerentry_starttime, _("Set the time the timer must start.")) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime, _("Set the time the timer must stop.")) if self.timerentry_justplay.value == "zap": self.list.append(self.entryShowEndTime) self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime, _("Set the time the timer must stop.")) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service, _("Set the channel for this timer.")) self.list.append(self.channelEntry) if self.timerentry_showendtime.value and self.timerentry_justplay.value == "zap": self.list.append(getConfigListEntry(_("After event"), self.timerentry_afterevent, _("What action is required on completion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do ecaxtly that."))) description = free = "" try: if self.timerentry_justplay.value != "zap": stat = statvfs(self.timerentry_dirname.value) a = float(stat.f_blocks) * stat.f_bsize / 1024 / 1024 / 1024 b = float(stat.f_bavail) * stat.f_bsize / 1024 / 1024 / 1024 c = 100.0 * b / a free = ("%0.f GB (%0.f %s) " + _("free diskspace")) % (b, c, "%") description = _("Current location") except: pass self["locationdescription"].setText(description) self["locationfreespace"].setText(free) self.dirname = getConfigListEntry(_("Location"), self.timerentry_dirname, _("Where should the recording be saved?")) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset, _("Choose a tag for easy finding a recording.")) if self.timerentry_justplay.value != "zap": if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append(getConfigListEntry(_("After Recording"), self.timerentry_afterevent, _("What action is required on completion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do ecaxtly that."))) self.list.append(getConfigListEntry(_("Recording type"), self.timerentry_recordingtype, _("Descramble & record ECM' gives the option to descramble afterwards if descrambling on recording failed. 'Don't descramble, record ECM' save a scramble recording that can be descrambled on playback. 'Normal' means descramble the recording and don't record ECM."))) self[widget].list = self.list self[widget].l.setList(self.list)
def initConfig(self): self.list = [ ] self.list.append(getConfigListEntry(_("Show 'RemoteTimer' in Eventinfo menu"), config.plugins.Partnerbox.enablepartnerboxeventinfomenu)) if config.plugins.Partnerbox.enablepartnerboxeventinfomenu.value: self.list.append(getConfigListEntry(_("Show 'RemoteTimer' in Event View context menu"), config.plugins.Partnerbox.enablepartnerboxeventinfocontextmenu)) self.list.append(getConfigListEntry(_("Show 'RemoteTimer' in E-Menu"), config.plugins.Partnerbox.showremotetimerinextensionsmenu)) self.list.append(getConfigListEntry(_("Show 'RemoteTV Player' in E-Menu"), config.plugins.Partnerbox.showremotetvinextensionsmenu)) self.list.append(getConfigListEntry(_("Show 'Stream current Service' in E-Menu"), config.plugins.Partnerbox.showcurrentstreaminextensionsmenu)) self.list.append(getConfigListEntry(_("Enable Partnerbox-Function in TimerEvent"), config.plugins.Partnerbox.enablepartnerboxintimerevent)) if config.plugins.Partnerbox.enablepartnerboxintimerevent.value: self.list.append(getConfigListEntry(_("Active boxes from local network only (using localhost names)"), config.plugins.Partnerbox.avahicompare)) self.list.append(getConfigListEntry(_("Enable first Partnerbox-entry in Timeredit as default"), config.plugins.Partnerbox.enabledefaultpartnerboxintimeredit)) self.list.append(getConfigListEntry(_("Enable VPS-Function in TimerEvent"), config.plugins.Partnerbox.enablevpsintimerevent)) self.list.append(getConfigListEntry(_("Enable Partnerbox-Function in EPGList"), config.plugins.Partnerbox.enablepartnerboxepglist)) if config.plugins.Partnerbox.enablepartnerboxepglist.value: self.list.append(getConfigListEntry(_("Enable Red Button-Function in single/multi EPG"), config.plugins.Partnerbox.enablepartnerboxzapbuton)) self.list.append(getConfigListEntry(_("Show duration time for event"), config.plugins.Partnerbox.showremaingepglist)) self.list.append(getConfigListEntry(_("Show all icon for event in EPGList"), config.plugins.Partnerbox.allicontype)) self.list.append(getConfigListEntry(_("Enable Partnerbox-Function in Channel Selector"), config.plugins.Partnerbox.enablepartnerboxchannelselector)) if autoTimerAvailable: self.list.append(getConfigListEntry(_("Enable Partnerbox-AutoTimer function"), config.plugins.Partnerbox.showpartnerboxautotimerninmenu)) self["config"].l.setList(self.list)
def GetConfigList(): optionList = [] optionList.append( getConfigListEntry(_("Use web-proxy for VODs (it may be illegal):"), config.plugins.iptvplayer.tv3player_use_web_proxy)) return optionList