from __future__ import print_function from __future__ import absolute_import from Components.Pixmap import MovingPixmap, MultiPixmap from Tools.Directories import resolveFilename, SCOPE_SKIN from xml.etree.ElementTree import ElementTree from Components.config import config, ConfigInteger from Components.RcModel import rc_model from boxbranding import getBoxType config.misc.rcused = ConfigInteger(default=1) class Rc: def __init__(self): self["rc"] = MultiPixmap() self["arrowdown"] = MovingPixmap() self["arrowdown2"] = MovingPixmap() self["arrowup"] = MovingPixmap() self["arrowup2"] = MovingPixmap() config.misc.rcused = ConfigInteger(default=1) self.isDefaultRc = rc_model.rcIsDefault() self.rcheight = 500 self.rcheighthalf = 250 self.selectpics = [] self.selectpics.append((self.rcheighthalf, ["arrowdown", "arrowdown2"], (-18, -70))) self.selectpics.append((self.rcheight, ["arrowup", "arrowup2"], (-18, 0)))
cmd = "config.inputDevices." + device + ".repeat.addNotifier(self.inputDevicesRepeatChanged,config.inputDevices." + device + ".repeat)" exec(cmd) if boxtype in ('maram9', 'classm', 'axodin', 'axodinc', 'starsatlx', 'genius', 'evo', 'galaxym6'): cmd = "config.inputDevices." + device + ".delay = ConfigSlider(default=200, increment = 100, limits=(0, 5000))" else: cmd = "config.inputDevices." + device + ".delay = ConfigSlider(default=700, increment = 100, limits=(0, 5000))" exec(cmd) cmd = "config.inputDevices." + device + ".delay.addNotifier(self.inputDevicesDelayChanged,config.inputDevices." + device + ".delay)" exec(cmd) iInputDevices = inputDevices() config.plugins.remotecontroltype = ConfigSubsection() config.plugins.remotecontroltype.rctype = ConfigInteger(default = 0) class RcTypeControl(): def __init__(self): if pathExists('/proc/stb/ir/rc/type') and getBrandOEM() not in ('gigablue', 'odin', 'ini', 'entwopia', 'tripledot'): self.isSupported = True if config.plugins.remotecontroltype.rctype.value != 0: self.writeRcType(config.plugins.remotecontroltype.rctype.value) else: self.isSupported = False def multipleRcSupported(self): return self.isSupported def writeRcType(self, rctype):
config.plugins.birthdayreminder = ConfigSubsection() config.plugins.birthdayreminder.file = ConfigText(default="/etc/enigma2/birthdayreminder") config.plugins.birthdayreminder.dateFormat = ConfigSelection(default="ddmmyyyy", choices=[("ddmmyyyy", "DD.MM.YYYY"), ("mmddyyyy", "MM/DD/YYYY")]) config.plugins.birthdayreminder.broadcasts = ConfigYesNo(default=True) config.plugins.birthdayreminder.preremind = ConfigSelection(default="7", choices=[("-1", _("Disabled")), ("1", _("1 day")), ("3", _("3 days")), ("7", _("1 week"))]) config.plugins.birthdayreminder.preremindChanged = NoSave(ConfigYesNo(default=False)) config.plugins.birthdayreminder.notificationTime = ConfigClock(default=64800) # 19:00 config.plugins.birthdayreminder.notificationTimeChanged = NoSave(ConfigYesNo(default=False)) config.plugins.birthdayreminder.sortby = ConfigSelection(default="1", choices=[ ("1", _("Name")), ("2", _("Next birthday")), ("3", _("Age")) ]) config.plugins.birthdayreminder.showInExtensions = ConfigYesNo(default=False) config.plugins.birthdayreminder.broadcastPort = ConfigInteger(default=7374, limits=(1024, 49151)) birthdaytimer = BirthdayTimer() def settings(session, **kwargs): session.open(BirthdayReminderSettings, birthdaytimer) def autostart(reason, **kwargs): if reason == 1: birthdaytimer.stop() def main(session, **kwargs):
from Screens.Screen import Screen from Components.config import config, ConfigSubsection, ConfigInteger config.plugins.OSDPositionSetup = ConfigSubsection() config.plugins.OSDPositionSetup.dst_left = ConfigInteger(default=0) config.plugins.OSDPositionSetup.dst_width = ConfigInteger(default=720) config.plugins.OSDPositionSetup.dst_top = ConfigInteger(default=0) config.plugins.OSDPositionSetup.dst_height = ConfigInteger(default=576) def setPosition(dst_left, dst_width, dst_top, dst_height): if dst_left + dst_width > 720: dst_width = 720 - dst_left if dst_top + dst_height > 576: dst_height = 576 - dst_top try: open("/proc/stb/fb/dst_left", "w").write('%08x' % dst_left) open("/proc/stb/fb/dst_width", "w").write('%08x' % dst_width) open("/proc/stb/fb/dst_top", "w").write('%08x' % dst_top) open("/proc/stb/fb/dst_height", "w").write('%08x' % dst_height) except: return def setConfiguredPosition(): setPosition(int(config.plugins.OSDPositionSetup.dst_left.value), int(config.plugins.OSDPositionSetup.dst_width.value), int(config.plugins.OSDPositionSetup.dst_top.value), int(config.plugins.OSDPositionSetup.dst_height.value))
(resolveFilename(SCOPE_CURRENT_PLUGIN, ''.join([SKINDIR, "XD_border.xml"])), "XD_border.xml"), (resolveFilename(SCOPE_CURRENT_PLUGIN, ''.join([SKINDIR, "SD_default.xml"])), "SD_default.xml"), (resolveFilename(SCOPE_CURRENT_PLUGIN, ''.join([SKINDIR, "HD_default.xml"])), "HD_default.xml"), (resolveFilename(SCOPE_CURRENT_PLUGIN, ''.join([SKINDIR, "XD_default.xml"])), "XD_default.xml") ] config.plugins.merlinEpgCenter = ConfigSubsection() config.plugins.merlinEpgCenter.primeTime = ConfigClock(default=69300) config.plugins.merlinEpgCenter.showListNumbers = ConfigYesNo(True) config.plugins.merlinEpgCenter.showPicons = ConfigYesNo(False) config.plugins.merlinEpgCenter.showServiceName = ConfigYesNo(True) config.plugins.merlinEpgCenter.lastUsedTab = ConfigInteger(0) config.plugins.merlinEpgCenter.showEventInfo = ConfigYesNo(True) config.plugins.merlinEpgCenter.showVideoPicture = ConfigYesNo(True) config.plugins.merlinEpgCenter.rememberLastTab = ConfigYesNo(True) config.plugins.merlinEpgCenter.selectRunningService = ConfigYesNo(True) config.plugins.merlinEpgCenter.replaceInfobarEpg = ConfigYesNo(False) config.plugins.merlinEpgCenter.epgPaths = ConfigSelection( default=eEnv.resolve('${datadir}/enigma2/picon_50x30/'), choices=[ (eEnv.resolve('${datadir}/enigma2/picon_50x30/'), eEnv.resolve('${datadir}/enigma2/picon_50x30')), ('/media/cf/picon_50x30/', '/media/cf/picon_50x30'), ('/media/usb/picon_50x30/', '/media/usb/picon_50x30'), ]) config.plugins.merlinEpgCenter.showColoredEpgTimes = ConfigYesNo(True) config.plugins.merlinEpgCenter.searchString = NoSave(ConfigText(default=""))
from Components.FileList import FileList from Components.AVSwitch import AVSwitch from Components.Sources.List import List from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSelection, ConfigText, ConfigOnOff, getConfigListEntry from Components.Label import Label from skin import componentSizes, TemplatedListFonts def getScale(): return AVSwitch().getFramebufferScale() config.pic = ConfigSubsection() config.pic.framesize = ConfigInteger(default=30, limits=(0, 99)) config.pic.slidetime = ConfigInteger(default=10, limits=(5, 60)) config.pic.resize = ConfigSelection(default="2", choices=[("0", _("simple")), ("1", _("better")), ("2", _("fast JPEG"))]) config.pic.resize.value = 2 # 2 = fast JPEG (non JPEG fallback to 1) config.pic.cache = ConfigOnOff(default=True) config.pic.lastDir = ConfigText(default=resolveFilename(SCOPE_MEDIA)) config.pic.infoline = ConfigOnOff(default=True) config.pic.loop = ConfigOnOff(default=True) config.pic.bgcolor = ConfigSelection(default="#000000", choices=[("#ffffff", _("white")), ("#000000", _("black")), ("#18188b", _("blue")), ("#9f1313", _("red")),
from Components.Label import Label from Components.ConfigList import ConfigListScreen from Components.config import config, getConfigListEntry, ConfigSubsection, ConfigInteger, ConfigYesNo, ConfigText, ConfigSelection from enigma import getDesktop from controllers.models.info import getInfo from httpserver import HttpdStart, HttpdStop, HttpdRestart from __init__ import _ config.ModernWebif = ConfigSubsection() config.ModernWebif.enabled = ConfigYesNo(default=True) config.ModernWebif.identifier = ConfigYesNo(default=True) config.ModernWebif.identifier_custom = ConfigYesNo(default=False) config.ModernWebif.identifier_text = ConfigText(default="", fixed_size=False) config.ModernWebif.port = ConfigInteger(default=80, limits=(1, 65535)) config.ModernWebif.streamport = ConfigInteger(default=8001, limits=(1, 65535)) config.ModernWebif.auth = ConfigYesNo(default=False) config.ModernWebif.xbmcservices = ConfigYesNo(default=False) config.ModernWebif.webcache = ConfigSubsection() # FIXME: anything better than a ConfigText? config.ModernWebif.webcache.collapsedmenus = ConfigText(default="remote", fixed_size=False) config.ModernWebif.webcache.remotegrabscreenshot = ConfigYesNo(default=True) config.ModernWebif.webcache.zapstream = ConfigYesNo(default=False) config.ModernWebif.webcache.epg_desc_search = ConfigYesNo(default=False) # HTTPS config.ModernWebif.https_enabled = ConfigYesNo(default=False) config.ModernWebif.https_port = ConfigInteger(default=443, limits=(1, 65535)) config.ModernWebif.https_auth = ConfigYesNo(default=True) config.ModernWebif.https_clientcert = ConfigYesNo(default=False)
profile("LOAD:Tools") from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_SKIN InitFallbackFiles() profile("config.misc") config.misc.radiopic = ConfigText( default=resolveFilename(SCOPE_CURRENT_SKIN, "radio.mvi")) config.misc.blackradiopic = ConfigText( default=resolveFilename(SCOPE_CURRENT_SKIN, "black.mvi")) config.misc.SyncTimeUsing = ConfigSelection(default="0", choices=[("0", _("Transponder time")), ("1", _("NTP"))]) config.misc.NTPserver = ConfigText(default='pool.ntp.org', fixed_size=False) config.misc.startCounter = ConfigInteger(default=0) # number of e2 starts... config.misc.standbyCounter = NoSave( ConfigInteger(default=0)) # number of standby config.misc.DeepStandby = NoSave( ConfigYesNo(default=False)) # detect deepstandby config.misc.RestartUI = ConfigYesNo( default=False) # detect user interface restart config.misc.prev_wakeup_time = ConfigInteger(default=0) #config.misc.prev_wakeup_time_type is only valid when wakeup_time is not 0 config.misc.prev_wakeup_time_type = ConfigInteger(default=0) # 0 = RecordTimer, 1 = ZapTimer, 2 = Plugins, 3 = WakeupTimer config.misc.epgcache_filename = ConfigText(default="/hdd/epg.dat") def setEPGCachePath(configElement): if os.path.isdir(configElement.value) or os.path.islink(
from Navigation import Navigation profile("LOAD:skin") from skin import readSkin profile("LOAD:Tools") from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_SKIN InitFallbackFiles() profile("config.misc") config.misc.radiopic = ConfigText( default=resolveFilename(SCOPE_CURRENT_SKIN, "radio.mvi")) config.misc.blackradiopic = ConfigText( default=resolveFilename(SCOPE_CURRENT_SKIN, "black.mvi")) config.misc.useTransponderTime = ConfigYesNo(default=True) config.misc.startCounter = ConfigInteger(default=0) # number of e2 starts... config.misc.standbyCounter = NoSave( ConfigInteger(default=0)) # number of standby config.misc.DeepStandby = NoSave( ConfigYesNo(default=False)) # detect deepstandby config.misc.RestartUI = ConfigYesNo( default=False) # detect user interface restart config.misc.epgcache_filename = ConfigText(default="/hdd/epg.dat") def setEPGCachePath(configElement): enigma.eEPGCache.getInstance().setCacheFile(configElement.value) #demo code for use of standby enter leave callbacks #def leaveStandby():
config_serviceapp.options["servicegstplayer"] = ConfigSubsection() config_serviceapp.options["serviceexteplayer3"] = ConfigSubsection() for key in config_serviceapp.options.keys(): config_serviceapp.options[key].hls_explorer = ConfigBoolean(default=True, descriptions={ False: _("false"), True: _("true") }) config_serviceapp.options[key].autoselect_stream = ConfigBoolean( default=True, descriptions={ False: _("false"), True: _("true") }) config_serviceapp.options[key].connection_speed_kb = ConfigInteger( 9999999, limits=(0, 9999999)) config_serviceapp.options[key].autoturnon_subtitles = ConfigBoolean( default=True, descriptions={ False: _("false"), True: _("true") }) config_serviceapp.gstplayer = ConfigSubDict() config_serviceapp.gstplayer["servicemp3"] = ConfigSubsection() config_serviceapp.gstplayer["servicegstplayer"] = ConfigSubsection() for key in config_serviceapp.gstplayer.keys(): config_serviceapp.gstplayer[key].sink = ConfigSelection( default="original", choices=sink_choices) config_serviceapp.gstplayer[key].buffer_size = ConfigInteger( 8192, (1024, 1024 * 64)) config_serviceapp.gstplayer[key].buffer_duration = ConfigInteger(
#AUDIOLANG_CHOICES = [ ("xxx" , "Standard"), ("deu", "German"), ("eng", "English"), ("fra", "French"), ("nld", "Dutch")] VCODEC_CHOICES = [("h264", "H.264"), ("h265", "H.265")] class AudioLanguageList: def __init__(self): self.audiolangChoices = [("xxx", "Auto")] for x in language.langlist: self.audiolangChoices.append((language.lang[x][1], language.lang[x][0])) def getaudiolanguagelist(self): return [(x) for x in self.audiolangChoices ] audiolanguagelist = AudioLanguageList() config.plugins.transcodingsetup = ConfigSubsection() config.plugins.transcodingsetup.port = ConfigInteger(default = None, limits = PORT_LIMITS) config.plugins.transcodingsetup.port2 = ConfigInteger(default = None, limits = PORT_LIMITS) config.plugins.transcodingsetup.bitrate = ConfigSelection(default = "1000000", choices = BITRATE_CHOICES) config.plugins.transcodingsetup.resolution = ConfigSelection(default = "720x576", choices = RESOLUTION_CHOICES) #config.plugins.transcodingsetup.audiolang = ConfigSelection(default = "xxx", choices = audiolanguagelist.getaudiolanguagelist()) #config.plugins.transcodingsetup.framerate = ConfigSelection(default = "25000", choices = [("23976", "23.976 fps"), ("24000", "24 fps"), ("25000", "25 fps"), ("30000", "30 fps")]) config.plugins.transcodingsetup.aspectratio = ConfigSelection(default = 2, choices = [ ("0", "auto"), ("1", "4x3"), ("2", "16x9") ]) config.plugins.transcodingsetup.interlaced = ConfigInteger(default = 0) if SystemInfo["HasH265Encoder"]: config.plugins.transcodingsetup.vcodec = ConfigSelection(default = "h265", choices = VCODEC_CHOICES ) class TranscodingSetup(ConfigListScreen, Screen): skin = """ <screen position="center,center" size="500,250" title="Transcoding Setup"> <widget name="content" position="0,0" size="500,22" font="Regular;19" />
} syswatchlist = {"off": _("Off"), "on": _("On")} config.plugins.FanSetup = ConfigSubsection() config.plugins.FanSetup.mode = ConfigSelection(choices=modelist, default="auto") config.plugins.FanSetup.timeset = ConfigSelection(choices=timsetlist, default="none") config.plugins.FanSetup.timestartoff = ConfigClock(default=((21 * 60 + 30) * 60)) config.plugins.FanSetup.timeendoff = ConfigClock(default=((7 * 60 + 0) * 60)) config.plugins.FanSetup.hddwatch = ConfigSelection(choices=hddwatchlist, default="none") config.plugins.FanSetup.hdddevice = ConfigText(default="all") config.plugins.FanSetup.hddsleep = ConfigBoolean(default=False) config.plugins.FanSetup.hddtemp = ConfigInteger(0, limits=(0, 80)) config.plugins.FanSetup.menuhdd = ConfigYesNo(default=False) config.plugins.FanSetup.fanspeed = ConfigSlider(default=127, increment=8, limits=(0, 255)) config.plugins.FanSetup.systemtemp = ConfigInteger(40, limits=(15, 80)) config.plugins.FanSetup.systempwatch = ConfigSelection(choices=syswatchlist, default="off") class FanSetupScreen(Screen, ConfigListScreen): global PLUGIN_VERSION skin = """ <screen position="center,center" size="550,335" > <widget name="config" position="c-261,c-145" size="533,270" /> <ePixmap pixmap="buttons/green.png" position="c-240,e-45" zPosition="0" size="140,40" alphatest="on" />
self.session.nav.playService(self.prevservice) def ok(self): if self["scan"].isDone(): self.restoreService() self.close() def cancel(self): self.restoreService() self.close() config.plugins.CableScan = ConfigSubsection() config.plugins.CableScan.keepnumbering = ConfigYesNo(default=False) config.plugins.CableScan.hdlist = ConfigYesNo(default=False) config.plugins.CableScan.frequency = ConfigInteger(default=323, limits=(1, 999)) config.plugins.CableScan.symbolrate = ConfigInteger(default=6875, limits=(1, 9999)) config.plugins.CableScan.networkid = ConfigInteger(default=0, limits=(0, 99999)) config.plugins.CableScan.modulation = ConfigSelection( choices=[(str(eDVBFrontendParametersCable.Modulation_QAM16), "QAM16"), (str(eDVBFrontendParametersCable.Modulation_QAM32), "QAM32"), (str(eDVBFrontendParametersCable.Modulation_QAM64), "QAM64"), (str(eDVBFrontendParametersCable.Modulation_QAM128), "QAM128"), (str(eDVBFrontendParametersCable.Modulation_QAM256), "QAM256")], default=str(eDVBFrontendParametersCable.Modulation_QAM64)) config.plugins.CableScan.auto = ConfigYesNo(default=True) class CableScanScreen(ConfigListScreen, Screen):
def createConfig(self): self.feinfo = None frontendData = None defaultSat = { "orbpos": 192, "system": eDVBFrontendParametersSatellite.System_DVB_S, "frequency": 11836, "inversion": eDVBFrontendParametersSatellite.Inversion_Unknown, "symbolrate": 27500, "polarization": eDVBFrontendParametersSatellite.Polarisation_Horizontal, "fec": eDVBFrontendParametersSatellite.FEC_Auto, "fec_s2": eDVBFrontendParametersSatellite.FEC_9_10, "modulation": eDVBFrontendParametersSatellite.Modulation_QPSK } self.service = self.session.nav.getCurrentService() if self.service is not None: self.feinfo = self.service.frontendInfo() frontendData = self.feinfo and self.feinfo.getAll(True) if frontendData is not None: ttype = frontendData.get("tuner_type", "UNKNOWN") if ttype == "DVB-S": defaultSat["system"] = frontendData.get( "system", eDVBFrontendParametersSatellite.System_DVB_S) defaultSat["frequency"] = frontendData.get("frequency", 0) / 1000 defaultSat["inversion"] = frontendData.get( "inversion", eDVBFrontendParametersSatellite.Inversion_Unknown) defaultSat["symbolrate"] = frontendData.get("symbol_rate", 0) / 1000 defaultSat["polarization"] = frontendData.get( "polarization", eDVBFrontendParametersSatellite.Polarisation_Horizontal) if defaultSat[ "system"] == eDVBFrontendParametersSatellite.System_DVB_S2: defaultSat["fec_s2"] = frontendData.get( "fec_inner", eDVBFrontendParametersSatellite.FEC_Auto) defaultSat["rolloff"] = frontendData.get( "rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35) defaultSat["pilot"] = frontendData.get( "pilot", eDVBFrontendParametersSatellite.Pilot_Unknown) else: defaultSat["fec"] = frontendData.get( "fec_inner", eDVBFrontendParametersSatellite.FEC_Auto) defaultSat["modulation"] = frontendData.get( "modulation", eDVBFrontendParametersSatellite.Modulation_QPSK) defaultSat["orbpos"] = frontendData.get("orbital_position", 0) del self.feinfo del self.service del frontendData self.scan_sat = ConfigSubsection() self.scan_networkScan = ConfigYesNo(default=False) # blindscan add self.blindscan_hi = ConfigSelection(default="hi_low", choices=[("low", _("low")), ("high", _("high")), ("hi_low", _("hi_low"))]) #ConfigYesNo(default = True) self.blindscan_start_frequency = ConfigInteger(default=950 * 1000000) self.blindscan_stop_frequency = ConfigInteger(default=2150 * 1000000) self.blindscan_start_symbol = ConfigInteger(default=2 * 1000000) self.blindscan_stop_symbol = ConfigInteger(default=45 * 1000000) self.scan_clearallservices = ConfigYesNo(default=False) self.scan_onlyfree = ConfigYesNo(default=False) # collect all nims which are *not* set to "nothing" nim_list = [] for n in nimmanager.nim_slots: if n.config_mode == "nothing": continue if n.config_mode == "advanced" and len( nimmanager.getSatListForNim(n.slot)) < 1: 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 if n.isCompatible("DVB-S"): nim_list.append((str(n.slot), n.friendly_full_description)) self.scan_nims = ConfigSelection(choices=nim_list) # sat self.scan_sat.frequency = ConfigInteger( default=defaultSat["frequency"], limits=(1, 99999)) #self.scan_sat.polarization = ConfigSelection(default = defaultSat["polarization"], choices = [ self.scan_sat.polarization = ConfigSelection( default=eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1, choices=[ (eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1, _("horizontal_vertical")), (eDVBFrontendParametersSatellite.Polarisation_Horizontal, _("horizontal")), (eDVBFrontendParametersSatellite.Polarisation_Vertical, _("vertical")), (eDVBFrontendParametersSatellite.Polarisation_CircularLeft, _("circular left")), (eDVBFrontendParametersSatellite.Polarisation_CircularRight, _("circular right")) ]) self.scan_scansat = {} for sat in nimmanager.satList: self.scan_scansat[sat[0]] = ConfigYesNo(default=False) self.scan_satselection = [] for slot in nimmanager.nim_slots: if slot.isCompatible("DVB-S"): self.scan_satselection.append( getConfigSatlist(defaultSat["orbpos"], self.satList[slot.slot])) return True
from Components.ActionMap import ActionMap, NumberActionMap from Components.Sources.StaticText import StaticText from Components.FileList import FileList from Components.AVSwitch import AVSwitch from Components.Sources.List import List from Components.ConfigList import ConfigList, ConfigListScreen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSelection, ConfigText, ConfigYesNo, KEY_LEFT, KEY_RIGHT, KEY_0, getConfigListEntry def getScale(): return AVSwitch().getFramebufferScale() config.pic = ConfigSubsection() config.pic.framesize = ConfigInteger(default=30, limits=(0, 99)) config.pic.slidetime = ConfigInteger(default=10, limits=(1, 99)) config.pic.resize = ConfigSelection(default="1", choices=[("0", _("simple")), ("1", _("better"))]) config.pic.cache = ConfigYesNo(default=True) config.pic.lastDir = ConfigText(default=resolveFilename(SCOPE_MEDIA)) config.pic.infoline = ConfigYesNo(default=True) config.pic.loop = ConfigYesNo(default=True) config.pic.bgcolor = ConfigSelection(default="#00000000", choices=[("#00000000", _("black")), ("#009eb9ff", _("blue")), ("#00ff5a51", _("red")), ("#00ffe875", _("yellow")), ("#0038FF48", _("green"))]) config.pic.textcolor = ConfigSelection(default="#0038FF48",
#Configuration config.plugins.epgrefresh = ConfigSubsection() config.plugins.epgrefresh.enabled = ConfigYesNo(default = False) config.plugins.epgrefresh.begin = ConfigClock(default = ((20*60) + 15) * 60) config.plugins.epgrefresh.end = ConfigClock(default = ((6*60) + 30) * 60) config.plugins.epgrefresh.interval_seconds = ConfigNumber(default = 120) config.plugins.epgrefresh.delay_standby = ConfigNumber(default = 10) config.plugins.epgrefresh.inherit_autotimer = ConfigYesNo(default = False) config.plugins.epgrefresh.afterevent = ConfigYesNo(default = False) config.plugins.epgrefresh.force = ConfigYesNo(default = False) config.plugins.epgrefresh.enablemessage = ConfigYesNo(default = True) config.plugins.epgrefresh.wakeup = ConfigYesNo(default = False) config.plugins.epgrefresh.start_on_mainmenu = ConfigYesNo(default = False) config.plugins.epgrefresh.stop_on_mainmenu = ConfigYesNo(default = True) config.plugins.epgrefresh.lastscan = ConfigNumber(default = 0) config.plugins.epgrefresh.timeout_shutdown = ConfigInteger(default = 2, limits= (2, 30)) config.plugins.epgrefresh.parse_autotimer = ConfigYesNo(default = False) config.plugins.epgrefresh.erase = ConfigYesNo(default = False) adapter_choices = [("main", _("Main Picture"))] if SystemInfo.get("NumVideoDecoders", 1) > 1: adapter_choices.append(("pip", _("Picture in Picture"))) adapter_choices.append(("pip_hidden", _("Picture in Picture (hidden)"))) if len(nimmanager.nim_slots) > 1: adapter_choices.append(("record", _("Fake recording"))) config.plugins.epgrefresh.adapter = ConfigSelection(choices = adapter_choices, default = "main") config.plugins.epgrefresh.add_to_refresh = ConfigSelection(choices = [ ("0", _("nowhere")), ("1", _("event info")), ("2", _("channel selection")),
config.plugins.dreamplex.mediafolderpath = ConfigText( default=defaultMediaFolderPath, fixed_size=False) config.plugins.dreamplex.skin = ConfigText(default=defaultSkin) config.plugins.dreamplex.showInMainMenu = ConfigYesNo(default=True) config.plugins.dreamplex.stopTVOnPicture = ConfigYesNo(default=True) config.plugins.dreamplex.useBufferControl = ConfigYesNo(default=True) config.plugins.dreamplex.useQuicktimeUserAgent = ConfigYesNo(default=True) config.plugins.dreamplex.setBufferSize = ConfigYesNo(default=True) config.plugins.dreamplex.setSeekOnStart = ConfigYesNo(default=True) config.plugins.dreamplex.bufferSize = ConfigNumber(default=8) config.plugins.dreamplex.playerTempPath = ConfigText( default=defaultPlayerTempPath, visible_width=50, fixed_size=False) config.plugins.dreamplex.entriescount = ConfigInteger(0) config.plugins.dreamplex.Entries = ConfigSubList() config.plugins.dreamplex.plugins = ConfigSubsection() #=============================================================================== # #=============================================================================== def initServerEntryConfig(): ''' ''' printl("", "__init__::initServerEntryConfig", "S") config.plugins.dreamplex.Entries.append(ConfigSubsection()) i = len(config.plugins.dreamplex.Entries) - 1
# -*- coding: utf-8 -*- from Screens.Screen import Screen from Components.BlinkingPixmap import BlinkingPixmapConditional from Components.Pixmap import Pixmap from Components.config import config, ConfigInteger from Components.Label import Label from Components.ServiceEventTracker import ServiceEventTracker from Components.Sources.Boolean import Boolean from enigma import eDVBSatelliteEquipmentControl, eTimer, iPlayableService, eServiceCenter, iServiceInformation from Components.NimManager import nimmanager from Components.Sources.FrontendStatus import FrontendStatus from ServiceReference import ServiceReference INVALID_POSITION = 9999 config.misc.lastrotorposition = ConfigInteger(INVALID_POSITION) class Dish(Screen): STATE_HIDDEN = 0 STATE_SHOWN = 1 def __init__(self, session): Screen.__init__(self, session) self["Dishpixmap"] = BlinkingPixmapConditional() self["Dishpixmap"].onVisibilityChange.append(self.DishpixmapVisibilityChanged) self["turnTime"] = Label("") self["posFrom"] = Label("") self["posGoto"] = Label("") self["From"] = Label(_("From :")) self["Goto"] = Label(_("Goto :")) self["Tuner"] = Label(_("Tuner :")) self["tunerName"] = Label("") self["turnSpeed"] = Label("")
#!/usr/bin/python # -*- coding: utf-8 -*- from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSlider, getConfigListEntry config.plugins.VideoClippingSetup = ConfigSubsection() config.plugins.VideoClippingSetup.clip_left = ConfigInteger(default = 0) config.plugins.VideoClippingSetup.clip_width = ConfigInteger(default = 720) config.plugins.VideoClippingSetup.clip_top = ConfigInteger(default = 0) config.plugins.VideoClippingSetup.clip_height = ConfigInteger(default = 576) class VideoClippingCoordinates(Screen, ConfigListScreen): skin = """ <screen position="0,0" size="e,e" title="Video clipping setup" backgroundColor="transparent"> <widget name="config" position="c-175,c-75" size="350,150" foregroundColor="black" backgroundColor="transparent" /> <ePixmap pixmap="buttons/green.png" position="c-145,e-100" zPosition="0" size="140,40" alphatest="on" /> <ePixmap pixmap="buttons/red.png" position="c+5,e-100" zPosition="0" size="140,40" alphatest="on" /> <widget name="ok" position="c-145,e-100" size="140,40" valign="center" halign="center" zPosition="1" font="Regular;20" transparent="1" backgroundColor="green" /> <widget name="cancel" position="c+5,e-100" size="140,40" valign="center" halign="center" zPosition="1" font="Regular;20" transparent="1" backgroundColor="red" /> </screen>""" def __init__(self, session): self.skin = VideoClippingCoordinates.skin Screen.__init__(self, session) self.setTitle(_("Video clipping setup")) from Components.ActionMap import ActionMap from Components.Button import Button
from Components.ActionMap import ActionMap from Components.Label import Label from Components.Button import Button from Screens.Screen import Screen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigYesNo, ConfigText, getConfigListEntry from Components.ConfigList import ConfigListScreen config.plugins.CDInfo = ConfigSubsection() config.plugins.CDInfo.useCDTEXT = ConfigYesNo(default=True) config.plugins.CDInfo.useCDDB = ConfigYesNo(default=True) config.plugins.CDInfo.displayString = ConfigText("$i - $t ($a)", fixed_size=False) config.plugins.CDInfo.preferCDDB = ConfigYesNo(default=False) config.plugins.CDInfo.CDDB_server = ConfigText("freedb.freedb.org", fixed_size=False) config.plugins.CDInfo.CDDB_port = ConfigInteger(8880, limits=(1, 65536)) config.plugins.CDInfo.CDDB_timeout = ConfigInteger(20, limits=(-1, 60)) config.plugins.CDInfo.CDDB_cache = ConfigYesNo(default=True) class CDInfo(ConfigListScreen, Screen): skin = """ <screen position="90,95" size="560,430" title="CDInfo" > <ePixmap pixmap="buttons/red.png" position="0,0" size="140,40" alphatest="on" /> <ePixmap pixmap="buttons/green.png" position="140,0" size="140,40" alphatest="on" /> <ePixmap pixmap="buttons/blue.png" position="420,0" size="140,40" alphatest="on" /> <widget name="key_red" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> <widget name="key_green" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> <widget name="key_blue" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" /> <widget name="info" position="20,50" size="520,40" font="Regular;20" transparent="1" /> <widget name="config" position="20,120" size="520,200" scrollbarMode="showOnDemand" />
def createSetup(self): self.list = [] self.multiscanlist = [] if self.scan_nims.value == "": return if self.scan_nims == []: return index_to_scan = int(self.scan_nims.value) print "ID: ", index_to_scan self.tunerEntry = getConfigListEntry(_("Tuner"), self.scan_nims) self.list.append(self.tunerEntry) self.systemEntry = None self.modulationEntry = None self.satelliteEntry = None self.searchtypeEntry = None nim = nimmanager.nim_slots[index_to_scan] self.scan_networkScan.value = False tunername = nimmanager.getNimName(index_to_scan) if nim.isCompatible("DVB-S"): self.updateSatList() selected_sat_pos = self.scan_satselection[index_to_scan].value limits = (10700, 12750) self.scan_sat.bs_freq_start = ConfigInteger(default=limits[0], limits=(limits[0], limits[1])) self.scan_sat.bs_freq_stop = ConfigInteger(default=limits[1], limits=(limits[0], limits[1])) self.satelliteEntry = getConfigListEntry( _("Satellite"), self.scan_satselection[index_to_scan]) self.list.append(self.satelliteEntry) self.searchtypeEntry = getConfigListEntry(_("Search type"), self.search_type) self.list.append( getConfigListEntry(_("Scan start frequency"), self.scan_sat.bs_freq_start)) self.list.append( getConfigListEntry(_("Scan stop frequency"), self.scan_sat.bs_freq_stop)) if nim.isCompatible( "DVB-S2" ) and tunername != "Si2166B" and tunername != "Si2169C": self.list.append( getConfigListEntry(_("Accuracy (higher is better)"), self.scan_sat.bs_accuracy)) self.list.append( getConfigListEntry(_("Horizontal"), self.scan_sat.bs_horizontal)) self.list.append( getConfigListEntry(_("Vertical"), self.scan_sat.bs_vertical)) self.list.append(self.searchtypeEntry) if self.search_type.value == 0: self.list.append( getConfigListEntry(_("Network scan"), self.scan_networkScan)) self.list.append( getConfigListEntry(_("Clear before scan"), self.scan_clearallservices)) self.list.append( getConfigListEntry(_("Only free scan"), self.scan_onlyfree)) self["config"].list = self.list self["config"].l.setList(self.list) self.scan_sat.bs_freq_limits = (limits[0] * 1000, limits[1] * 1000)
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import NumberActionMap from Components.Input import Input from Components.Label import Label from Components.Pixmap import Pixmap from Components.config import config, ConfigInteger from Components.SystemInfo import SystemInfo from enigma import eEPGCache from SleepTimer import SleepTimer from time import time config.SleepTimer.defaulttime = ConfigInteger(default=30) class SleepTimerEdit(Screen): def __init__(self, session): Screen.__init__(self, session) self["red"] = Pixmap() self["green"] = Pixmap() self["yellow"] = Pixmap() self["blue"] = Pixmap() self["red_text"] = Label() self["green_text"] = Label() self["yellow_text"] = Label() self["blue_text"] = Label() self["current_status"] = Label() self.is_active = self.session.nav.SleepTimer.isActive() if self.is_active: self["current_status"].setText(
from Components.Pixmap import Pixmap from enigma import ePicLoad, eRect, eSize, gPixmapPtr from Components.AVSwitch import AVSwitch from Components.config import ConfigSubsection, ConfigSubList, ConfigInteger, config from setup import initConfig, MSNWeatherPluginEntriesListConfigScreen from MSNWeather import MSNWeather import time try: from Components.WeatherMSN import weathermsn WeatherMSNComp = weathermsn except: WeatherMSNComp = None config.plugins.WeatherPlugin = ConfigSubsection() config.plugins.WeatherPlugin.entrycount = ConfigInteger(0) config.plugins.WeatherPlugin.Entry = ConfigSubList() initConfig() def main(session, **kwargs): session.open(MSNWeatherPlugin) def Plugins(**kwargs): list = [ PluginDescriptor(name=_("Weather Plugin"), description=_("Show Weather Forecast"), where=[ PluginDescriptor.WHERE_PLUGINMENU, PluginDescriptor.WHERE_EXTENSIONSMENU
# skin. # currently, loadSingleSkinData (colors, bordersets etc.) # are applied one-after-each, in order of ascending priority. # the dom_skin will keep all screens in descending priority, # so the first screen found will be used. # example: loadSkin("nemesis_greenline/skin.xml") config.skin = ConfigSubsection() DEFAULT_SKIN = "skin.xml" # on SD hardware, PLi-HD will not be available if not fileExists(resolveFilename(SCOPE_SKIN, DEFAULT_SKIN)): # in that case, fallback to Magic (which is an SD skin) DEFAULT_SKIN = "Magic/skin.xml" config.skin.primary_skin = ConfigText(default=DEFAULT_SKIN) config.skin.xres = ConfigInteger(default=0) profile("LoadSkin") res = None name = skin_user_skinname() if name: res = addSkin(name, SCOPE_CONFIG) if not name or not res: addSkin('skin_user.xml', SCOPE_CONFIG) # some boxes lie about their dimensions addSkin('skin_box.xml') # add optional discrete second infobar addSkin('skin_second_infobar.xml') display_skin_id = 1 addSkin('skin_display.xml')
#CONFIG INIT #init the config config.plugins.Webinterface = ConfigSubsection() config.plugins.Webinterface.enabled = ConfigYesNo(default=True) config.plugins.Webinterface.allowzapping = ConfigYesNo(default=True) config.plugins.Webinterface.includemedia = ConfigYesNo(default=False) config.plugins.Webinterface.autowritetimer = ConfigYesNo(default=False) config.plugins.Webinterface.loadmovielength = ConfigYesNo(default=True) config.plugins.Webinterface.version = ConfigText( __version__ ) # used to make the versioninfo accessible enigma2-wide, not confgurable in GUI. config.plugins.Webinterface.http = ConfigSubsection() config.plugins.Webinterface.http.enabled = ConfigYesNo(default=True) config.plugins.Webinterface.http.port = ConfigInteger(default=80, limits=(1, 65535)) config.plugins.Webinterface.http.auth = ConfigYesNo(default=False) config.plugins.Webinterface.https = ConfigSubsection() config.plugins.Webinterface.https.enabled = ConfigYesNo(default=True) config.plugins.Webinterface.https.port = ConfigInteger(default=443, limits=(1, 65535)) config.plugins.Webinterface.https.auth = ConfigYesNo(default=True) config.plugins.Webinterface.streamauth = ConfigYesNo(default=False) global running_defered, waiting_shutdown, toplevel running_defered = [] waiting_shutdown = 0 toplevel = None
#!/usr/bin/python # -*- coding: utf-8 -*- # for localized messages from . import _ from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSubList from Plugins.Plugin import PluginDescriptor from Screens.MessageBox import MessageBox import AC3main import AC3setup config.plugins.AC3LipSync = ConfigSubsection() config.plugins.AC3LipSync.outerBounds = ConfigInteger(default=1000, limits=(-10000, 10000)) config.plugins.AC3LipSync.arrowStepSize = ConfigInteger(default=5, limits=(-10000, 10000)) config.plugins.AC3LipSync.activationDelay = ConfigInteger(default=800, limits=(-10000, 10000)) config.plugins.AC3LipSync.stepSize13 = ConfigInteger(default=50, limits=(-10000, 10000)) config.plugins.AC3LipSync.stepSize46 = ConfigInteger(default=200, limits=(-10000, 10000)) config.plugins.AC3LipSync.stepSize79 = ConfigInteger(default=500, limits=(-10000, 10000)) config.plugins.AC3LipSync.absoluteStep2 = ConfigInteger(default=0, limits=(-10000, 10000)) config.plugins.AC3LipSync.absoluteStep5 = ConfigInteger(default=0, limits=(-10000, 10000)) config.plugins.AC3LipSync.absoluteStep8 = ConfigInteger(default=0, limits=(-10000, 10000))
from Components.config import config, getConfigListEntry from Components.ConfigList import ConfigListScreen from Components.Label import Label from Components.ActionMap import ActionMap from Components.config import config, ConfigSubsection, ConfigInteger, ConfigYesNo from Components.Network import iNetwork from Plugins.Plugin import PluginDescriptor from twisted.web import proxy, http from twisted.internet import reactor ############################################################################### config.plugins.httpproxy = ConfigSubsection() config.plugins.httpproxy.enable = ConfigYesNo(default=True) config.plugins.httpproxy.port = ConfigInteger(8080, limits=(1, 65536)) config.plugins.httpproxy.filter_hosts = ConfigYesNo(default=False) config.plugins.httpproxy.filter_uri = ConfigYesNo(default=False) global ALLOWED_CLIENTS, LOG_TO_STDOUT, URI_BLACKLIST LOG_TO_STDOUT = False ALLOWED_CLIENTS = ['192.168.1.3' ] # only clients listed here with ther IP Adress passed URI_BLACKLIST = ['microsoft', 'teen', 'p**n'] # all uri s containig this words will be blocked ############################################################################### class HTTPProxyConfigScreen(ConfigListScreen, Screen): skin = """ <screen position="100,100" size="550,400" title="HTTP Proxy Setup" >
% filename) else: print( "[InputDevice] RC remap error %d: Opening remote control file '%s'! (%s)" % (err.errno, filename, err.strerror)) except Exception as err: print( "[InputDevice] RC remap error: Unexpected error opening remote control file '%s'! (%s)" % (filename, err)) return domRemote iInputDevices = inputDevices() config.plugins.remotecontroltype = ConfigSubsection() config.plugins.remotecontroltype.rctype = ConfigInteger( default=int(getRCType())) config.plugins.remotecontroltype.multirc = ConfigYesNo(default=False) class RcTypeControl(): def __init__(self): if pathExists( "/proc/stb/ir/rc/type" ) and config.plugins.remotecontroltype.multirc.value is True: self.isSupported = True if config.plugins.remotecontroltype.rctype.value != 0: self.writeRcType(config.plugins.remotecontroltype.rctype.value) else: self.isSupported = False def multipleRcSupported(self):
from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSelection, ConfigSlider, getConfigListEntry modelist = { "off": _("Off"), "auto": _("Auto"), "sidebyside": _("Side by side"), "topandbottom": _("Top and bottom") } config.plugins.OSD3DSetup = ConfigSubsection() config.plugins.OSD3DSetup.mode = ConfigSelection(choices=modelist, default="auto") config.plugins.OSD3DSetup.znorm = ConfigInteger(default=0) class OSD3DSetupScreen(Screen, ConfigListScreen): skin = """ <screen position="c-200,c-100" size="400,200" title="OSD 3D setup"> <widget name="config" position="c-175,c-75" size="350,150" /> <ePixmap pixmap="skin_default/buttons/green.png" position="c-145,e-45" zPosition="0" size="140,40" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/red.png" position="c+5,e-45" zPosition="0" size="140,40" alphatest="on" /> <widget name="ok" position="c-145,e-45" size="140,40" valign="center" halign="center" zPosition="1" font="Regular;20" transparent="1" backgroundColor="green" /> <widget name="cancel" position="c+5,e-45" size="140,40" valign="center" halign="center" zPosition="1" font="Regular;20" transparent="1" backgroundColor="red" /> </screen>""" def __init__(self, session): self.skin = OSD3DSetupScreen.skin Screen.__init__(self, session)
from Plugins.Extensions.IMDb.plugin import IMDB IMDbPresent = True else: IMDbPresent = False if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/EPGSearch/EPGSearch.pyo"): from Plugins.Extensions.EPGSearch.EPGSearch import EPGSearchList, EPGSearch epgSpresent = True else: epgSpresent = False from six.moves import range config.plugins.MerlinEPG = ConfigSubsection() config.plugins.MerlinEPG.Columns = ConfigYesNo(default=True) config.plugins.MerlinEPG.StartFirst = ConfigYesNo(default=False) config.plugins.MerlinEPG.Primetime = ConfigInteger(default=20, limits=(0, 23)) config.plugins.MerlinEPG.PTlow = ConfigInteger(default=10, limits=(0, 59)) config.plugins.MerlinEPG.PThi = ConfigInteger(default=20, limits=(0, 59)) config.plugins.MerlinEPG.AutoPT = ConfigYesNo(default=False) config.plugins.MerlinEPG.ZapOnOK = ConfigYesNo(default=False) config.plugins.MerlinEPG.PageUDonBouquets = ConfigYesNo(default=True) def Plugins(**kwargs): list = [(PluginDescriptor(name="Merlin Programm Guide", description="Merlin Programm Guide", where=PluginDescriptor.WHERE_EVENTINFO, fnc=startMerlinPG))] list.append(PluginDescriptor(name="Merlin Programm Guide", where=PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=startMerlinPGnew)) return list def startMerlinPG(session, servicelist, **kwargs): if config.plugins.MerlinEPG.Columns.value: