Esempio n. 1
0
    def __init__(self):
        # Is called on instance creation
        ServiceBase.__init__(self)
        self.connectors = []

        # Default configuration
        self.setOption(
            'smtpserver',
            NoSave(ConfigText(default="smtp.server.com", fixed_size=False)),
            _("SMTP Server"))
        self.setOption('smtpport', NoSave(ConfigNumber(default=587)),
                       _("SMTP Port"))
        self.setOption('smtpssl', NoSave(ConfigYesNo(default=True)),
                       _("SMTP SSL"))
        self.setOption('smtptls', NoSave(ConfigYesNo(default=True)),
                       _("SMTP TLS"))
        self.setOption('timeout', NoSave(ConfigNumber(default=30)),
                       _("Timeout"))

        self.setOption('username',
                       NoSave(ConfigText(default="user", fixed_size=False)),
                       _("User name"))
        self.setOption('password', NoSave(ConfigPassword(default="password")),
                       _("Password"))

        self.setOption(
            'mailfrom',
            NoSave(ConfigText(default="*****@*****.**", fixed_size=False)),
            _("Mail from"))
        self.setOption('mailto', NoSave(ConfigText(fixed_size=False)),
                       _("Mail to or leave empty (From will be used)"))
Esempio n. 2
0
def initWeatherConfig():
    config.plugins.MetrixWeather = ConfigSubsection()

    #MetrixWeather

    config.plugins.MetrixWeather.enabled = ConfigYesNo(default=True)
    config.plugins.MetrixWeather.MoviePlayer = ConfigYesNo(default=True)
    config.plugins.MetrixWeather.refreshInterval = ConfigNumber(default=60)
    config.plugins.MetrixWeather.woeid = ConfigNumber(
        default=676757)  #Location (visit metrixhd.info)
    config.plugins.MetrixWeather.tempUnit = ConfigSelection(
        default="Celsius",
        choices=[("Celsius", _("Celsius")), ("Fahrenheit", _("Fahrenheit"))])

    ## RENDERER CONFIG:

    config.plugins.MetrixWeather.currentLocation = ConfigText(default="N/A")
    config.plugins.MetrixWeather.currentWeatherCode = ConfigText(default="(")
    config.plugins.MetrixWeather.currentWeatherText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.currentWeatherTemp = ConfigText(default="0")

    config.plugins.MetrixWeather.forecastTodayCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecastTodayText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecastTodayTempMin = ConfigText(default="0")
    config.plugins.MetrixWeather.forecastTodayTempMax = ConfigText(default="0")

    config.plugins.MetrixWeather.forecastTomorrowCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecastTomorrowText = ConfigText(
        default="N/A")
    config.plugins.MetrixWeather.forecastTomorrowTempMin = ConfigText(
        default="0")
    config.plugins.MetrixWeather.forecastTomorrowTempMax = ConfigText(
        default="0")
Esempio n. 3
0
	def initConfig(self): 
		if self.editmode:    
			if 'bouquet_info' in jglob.current_playlist:
				self.aliasCfg = NoSave(ConfigText(default=self.alias, fixed_size=False))
				self.xmltvCfg = NoSave(ConfigText(default=self.xmltv, fixed_size=False))
			if jglob.current_playlist['playlist_info']['playlisttype'] == 'xtream':
				self.protocolCfg = NoSave(ConfigSelection(default=self.protocol, choices=[('http://', _('http://')), ('https://', _('https://'))]))
				self.playlisttypeCfg = NoSave(ConfigSelection(default='standard', choices=[('standard', _('Standard Playlist')), ('m3u', _('M3U File'))]))
				self.serverCfg = NoSave(ConfigText(default=self.domain, fixed_size=False))
				self.portCfg = NoSave(ConfigNumber(default=self.port))
				self.usernameCfg = NoSave(ConfigText(default=self.username, fixed_size=False))
				self.passwordCfg = NoSave(ConfigText(default=self.password, fixed_size=False))    
				self.outputCfg = NoSave(ConfigSelection(default=self.output, choices=[('ts', 'ts'), ('m3u8', 'm3u8')]))
			else:
				self.playlisttypeCfg = NoSave(ConfigSelection(default='m3u', choices=[('standard', _('Standard Playlist')), ('m3u', _('M3U File'))]))
				self.addressCfg = NoSave(ConfigText(default=self.address, fixed_size=False))
		else: 
			self.playlisttypeCfg = NoSave(ConfigSelection(default='standard', choices=[('standard', _('Standard Playlist')), ('m3u', _('M3U File'))]))
			self.protocolCfg = NoSave(ConfigSelection(default='http://', choices=[('http://', _('http://')), ('https://', _('https://'))]))
			self.serverCfg = NoSave(ConfigText(default='domain.xyz', fixed_size=False))
			self.portCfg = NoSave(ConfigNumber(default=80))
			self.usernameCfg = NoSave(ConfigText(default= _('username'), fixed_size=False))
			self.passwordCfg = NoSave(ConfigText(default= _('password'), fixed_size=False))
			self.outputCfg = NoSave(ConfigSelection(default=self.output, choices=[('ts', 'ts'), ('m3u8', 'm3u8')]))
			self.addressCfg = NoSave(ConfigText(default=self.address, fixed_size=False))
Esempio n. 4
0
def BaseInitUsageConfig():
	config.usage = ConfigSubsection();

	config.usage.keymap = ConfigText(default = eEnv.resolve("${datadir}/enigma2/keymap.xml"))

	config.usage.setup_level = ConfigSelection(default = "intermediate", choices = [
		("simple", _("Simple")),
		("intermediate", _("Intermediate")),
		("expert", _("Expert")) ])

	config.seek = ConfigSubsection()
	config.seek.selfdefined_13 = ConfigNumber(default=15)
	config.seek.selfdefined_46 = ConfigNumber(default=60)
	config.seek.selfdefined_79 = ConfigNumber(default=300)

	config.seek.speeds_forward = ConfigSet(default=[2, 4, 8, 16, 32, 64, 128], choices=[2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128])
	config.seek.speeds_backward = ConfigSet(default=[2, 4, 8, 16, 32, 64, 128], choices=[1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128])
	config.seek.speeds_slowmotion = ConfigSet(default=[2, 4, 8], choices=[2, 4, 6, 8, 12, 16, 25])

	config.seek.enter_forward = ConfigSelection(default = "2", choices = ["2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"])
	config.seek.enter_backward = ConfigSelection(default = "1", choices = ["1", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"])

	def updateEnterForward(configElement):
		if not configElement.value:
			configElement.value = [2]
		updateChoices(config.seek.enter_forward, configElement.value)
	config.seek.speeds_forward.addNotifier(updateEnterForward, immediate_feedback = False)

	def updateEnterBackward(configElement):
		if not configElement.value:
			configElement.value = [2]
		updateChoices(config.seek.enter_backward, configElement.value)
	config.seek.speeds_backward.addNotifier(updateEnterBackward, immediate_feedback = False)
Esempio n. 5
0
def InitRecordingConfig():
    config.recording = ConfigSubsection()
    # actually this is "recordings always have priority". "Yes" does mean: don't ask. The RecordTimer will ask when value is 0.
    config.recording.asktozap = ConfigYesNo(default=True)
    config.recording.margin_before = ConfigNumber(default=3)
    config.recording.margin_after = ConfigNumber(default=5)
    config.recording.debug = ConfigYesNo(default=False)
    config.recording.ascii_filenames = ConfigYesNo(default=False)
    config.recording.keep_timers = ConfigNumber(default=7)
    config.recording.filename_composition = ConfigSelection(
        default="standard",
        choices=[("standard", _("standard")), ("event", _("Event name first")),
                 ("short", _("Short filenames")),
                 ("long", _("Long filenames"))])
    config.recording.always_ecm = ConfigYesNo(default=False)
    config.recording.never_decrypt = ConfigYesNo(default=False)
    config.recording.offline_decode_delay = ConfigInteger(default=1000,
                                                          limits=(1, 10000))
    config.recording.timer_default_type = ConfigSelection(choices=[
        ("zap", _("zap")), ("record", _("record")),
        ("zap+record", _("zap and record"))
    ],
                                                          default="record")
    config.recording.show_rec_symbol_for_rec_types = ConfigSelection(
        choices=[("any", _("any recordings")), ("real", _("real recordings")),
                 ("real_streaming", _("real recordings or streaming")),
                 ("real_pseudo", _("real or pseudo recordings"))],
        default="real_streaming")
Esempio n. 6
0
	def initConfig(self): 
		streamtypechoices = [('1', 'DVB(1)'), ('4097', 'IPTV(4097)')]

		if os.path.exists("/usr/bin/gstplayer"):
			streamtypechoices.append( ('5001', 'GStreamer(5001)' ) )
			
		if os.path.exists("/usr/bin/exteplayer3"):
			streamtypechoices.append( ('5002', 'ExtePlayer(5002)') )
			
		if os.path.exists("/usr/bin/apt-get"):
			streamtypechoices.append( ('8193', 'DreamOS GStreamer(8193)') )
				
		if self.editmode == False: 
			self.protocolCfg = NoSave(ConfigSelection(default=self.protocol, choices=[('http://', _('http://')), ('https://', _('https://'))]))
			self.serverCfg = NoSave(ConfigText(default=self.server, fixed_size=False))
			self.portCfg = NoSave(ConfigNumber(default=self.port))
			self.usernameCfg = NoSave(ConfigText(default=self.username, fixed_size=False))
			self.passwordCfg = NoSave(ConfigText(default= self.password, fixed_size=False))
			self.outputCfg = NoSave(ConfigSelection(default=self.output, choices=[('ts', 'ts'), ('m3u8', 'm3u8')]))
		else: 
			self.name = str(glob.current_playlist['playlist_info']['name'])
			self.protocol = str(glob.current_playlist['playlist_info']['protocol'])
			self.domain = str(glob.current_playlist['playlist_info']['domain'])
			self.port = str(glob.current_playlist['playlist_info']['port'])
			self.username = str(glob.current_playlist['playlist_info']['username'])
			self.password = str(glob.current_playlist['playlist_info']['password'])
			self.output = str(glob.current_playlist['playlist_info']['output'])
			self.liveType = str(glob.current_playlist['player_info']['livetype'])
			self.vodType = str(glob.current_playlist['player_info']['vodtype'])
			self.catchupType = str(glob.current_playlist['player_info']['catchuptype'])
			self.epgType = str(glob.current_playlist['player_info']['epgtype'])
			self.epgshift = str(glob.current_playlist['player_info']['epgshift'])
			self.epgquickshift = str(glob.current_playlist['player_info']['epgquickshift'])
			self.showlive = glob.current_playlist['player_info']['showlive']
			self.showvod = glob.current_playlist['player_info']['showvod']
			self.showseries = glob.current_playlist['player_info']['showseries']
			self.showcatchup = glob.current_playlist['player_info']['showcatchup']
			  
			self.nameCfg = NoSave(ConfigText(default=self.name, fixed_size=False))
			self.protocolCfg = NoSave(ConfigSelection(default=self.protocol, choices=[('http://', _('http://')), ('https://', _('https://'))]))
			self.serverCfg = NoSave(ConfigText(default=self.domain, fixed_size=False))
			self.portCfg = NoSave(ConfigNumber(default=self.port))
			self.usernameCfg = NoSave(ConfigText(default=self.username, fixed_size=False))
			self.passwordCfg = NoSave(ConfigText(default=self.password, fixed_size=False))  
			self.outputCfg = NoSave(ConfigSelection(default=self.output, choices=[('ts', 'ts'), ('m3u8', 'm3u8')]))
			self.liveTypeCfg = NoSave(ConfigSelection(default=self.liveType, choices=streamtypechoices))
			self.vodTypeCfg = NoSave(ConfigSelection(default=self.vodType, choices=streamtypechoices))
			self.catchupTypeCfg = NoSave(ConfigSelection(default=self.catchupType, choices=streamtypechoices))
			self.epgTypeCfg = NoSave(ConfigSelection(default=self.epgType, choices=[   ('0', _('Off')), ('1', _('Quick')), ('2', _('Full')) ]))
			self.epgShiftCfg = NoSave(ConfigSelectionNumber(min = -12, max = 12, stepwidth = 1, default=self.epgshift))
			self.epgQuickShiftCfg = NoSave(ConfigSelectionNumber(min = -12, max = 12, stepwidth = 1, default=self.epgquickshift))
			self.showliveCfg = NoSave(ConfigYesNo(default=self.showlive))
			self.showvodCfg = NoSave(ConfigYesNo(default=self.showvod))
			self.showseriesCfg = NoSave(ConfigYesNo(default=self.showseries))
			self.showcatchupCfg = NoSave(ConfigYesNo(default=self.showcatchup))
			
		self.createSetup()
Esempio n. 7
0
def initWeatherConfig():
    config.plugins.MetrixWeather = ConfigSubsection()
    #MetrixWeather
    config.plugins.MetrixWeather.enabled = ConfigYesNo(default=False)
    config.plugins.MetrixWeather.woeid = ConfigNumber(
        default=665912)  #Location (metrixweather.open-store.net)
    config.plugins.MetrixWeather.tempUnit = ConfigSelection(
        default="Celsius",
        choices=[("Celsius", _("Celsius")), ("Fahrenheit", _("Fahrenheit"))])
    config.plugins.MetrixWeather.refreshInterval = ConfigNumber(default=60)
    config.plugins.MetrixWeather.lastUpdated = ConfigText(
        default="2001-01-01 01:01:01")

    ## RENDERER CONFIG:
    config.plugins.MetrixWeather.currentLocation = ConfigText(default="N/A")
    config.plugins.MetrixWeather.currentWeatherCode = ConfigText(default="(")
    config.plugins.MetrixWeather.currentWeatherText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.currentWeatherTemp = ConfigText(default="0")

    config.plugins.MetrixWeather.forecastTodayCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecastTodayDay = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecastTodayText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecastTodayTempMin = ConfigText(default="0")
    config.plugins.MetrixWeather.forecastTodayTempMax = ConfigText(default="0")

    config.plugins.MetrixWeather.forecastTomorrowCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecastTomorrowDay = ConfigText(
        default="N/A")
    config.plugins.MetrixWeather.forecastTomorrowText = ConfigText(
        default="N/A")
    config.plugins.MetrixWeather.forecastTomorrowTempMin = ConfigText(
        default="0")
    config.plugins.MetrixWeather.forecastTomorrowTempMax = ConfigText(
        default="0")

    config.plugins.MetrixWeather.forecast2daysCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecast2daysDay = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecast2daysText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecast2daysTempMin = ConfigText(default="0")
    config.plugins.MetrixWeather.forecast2daysTempMax = ConfigText(default="0")

    config.plugins.MetrixWeather.forecast3daysCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecast3daysDay = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecast3daysText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecast3daysTempMin = ConfigText(default="0")
    config.plugins.MetrixWeather.forecast3daysTempMax = ConfigText(default="0")

    config.plugins.MetrixWeather.forecast4daysCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecast4daysDay = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecast4daysText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecast4daysTempMin = ConfigText(default="0")
    config.plugins.MetrixWeather.forecast4daysTempMax = ConfigText(default="0")

    config.plugins.MetrixWeather.save()
    configfile.save()
Esempio n. 8
0
class Change_volume(ConfigListScreen, Screen):
	skin = """
		<screen position="center,center" size="310,190"  title="Change Volume offset" >
			<widget name="config" position="10,10" size="290,210" scrollbarMode="showOnDemand" />
			<ePixmap position="10,130" size="290,2" pixmap="skin_default/div-h.png" transparent="1" alphatest="on" />
			<eLabel backgroundColor="red" position="10,181" size="90,3" zPosition="0" />
			<eLabel backgroundColor="green" position="110,181" size="90,3" zPosition="0" />
			<eLabel backgroundColor="yellow" position="210,181" size="90,3" zPosition="0" />
			<widget source="key_red" render="Label" position="10,158" zPosition="1" size="90,22" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
			<widget source="key_green" render="Label" position="110,158" zPosition="1" size="90,22" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
			<widget source="key_yellow" render="Label" position="210,158" zPosition="1" size="90,22" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
		</screen>"""

	def __init__(self, session, name, vol):
		self.skin = Change_volume.skin
		Screen.__init__(self, session)
		self.offset = ConfigNumber(default="0")
		global offset
		self.offset.setValue(str(offset))
		self.Clist = []
		self.Clist.append(getConfigListEntry(_(name), self.offset))
		ConfigListScreen.__init__(self, self.Clist)
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Ok"))
		self["key_yellow"] = StaticText(_("+/-"))
		self["actions"] = ActionMap(["ColorActions","SetupActions"],
		{
			"ok": self.ok,
			"cancel": self.cancel,
			"green": self.greenPressed,
			"red": self.cancel,
			"yellow": self.yellowPressed,
		}, -2)
		self.onShown.append(self.setWindowTitle)

	def setWindowTitle(self):
		self.setTitle(_("Change Volume offset"))

	def greenPressed(self):
		global offset
		offset  = self.offset.value
		self.close()

	def yellowPressed(self):
		global offset
		offset  = self.offset.value * -1
		self.offset.setValue(str(offset))
		self["config"].list = self.Clist
		self["config"].l.setList(self.Clist)

	def ok(self):
		self.greenPressed()

	def cancel(self):
		self.close()
Esempio n. 9
0
class Change_volume(ConfigListScreen, Screen):
    skin = """
		<screen position="center,center" size="310,190"  title="Change Volume offset" >
			<widget name="config" position="10,10" size="290,210" scrollbarMode="showOnDemand" />
			<ePixmap position="10,130" size="290,2" pixmap="skin_default/div-h.png" transparent="1" alphatest="on" />
			<eLabel backgroundColor="red" position="10,181" size="90,3" zPosition="0" />
			<eLabel backgroundColor="green" position="110,181" size="90,3" zPosition="0" />
			<eLabel backgroundColor="yellow" position="210,181" size="90,3" zPosition="0" />
			<widget source="key_red" render="Label" position="10,158" zPosition="1" size="90,22" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
			<widget source="key_green" render="Label" position="110,158" zPosition="1" size="90,22" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
			<widget source="key_yellow" render="Label" position="210,158" zPosition="1" size="90,22" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
		</screen>"""

    def __init__(self, session, name, vol):
        self.skin = Change_volume.skin
        Screen.__init__(self, session)
        self.offset = ConfigNumber(default="0")
        global offset
        self.offset.setValue(str(offset))
        self.Clist = []
        self.Clist.append(getConfigListEntry(_(name), self.offset))
        ConfigListScreen.__init__(self, self.Clist)
        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("Ok"))
        self["key_yellow"] = StaticText(_("+/-"))
        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions"], {
                "ok": self.ok,
                "cancel": self.cancel,
                "green": self.greenPressed,
                "red": self.cancel,
                "yellow": self.yellowPressed,
            }, -2)
        self.onShown.append(self.setWindowTitle)

    def setWindowTitle(self):
        self.setTitle(_("Change Volume offset"))

    def greenPressed(self):
        global offset
        offset = self.offset.value
        self.close()

    def yellowPressed(self):
        global offset
        offset = self.offset.value * -1
        self.offset.setValue(str(offset))
        self["config"].list = self.Clist
        self["config"].l.setList(self.Clist)

    def ok(self):
        self.greenPressed()

    def cancel(self):
        self.close()
Esempio n. 10
0
def InitRecordingConfig():
	config.recording = ConfigSubsection();
	# actually this is "recordings always have priority". "Yes" does mean: don't ask. The RecordTimer will ask when value is 0.
	config.recording.asktozap = ConfigYesNo(default=True)
	config.recording.margin_before = ConfigNumber(default=0)
	config.recording.margin_after = ConfigNumber(default=0)
	config.recording.debug = ConfigYesNo(default = False)
	config.recording.ascii_filenames = ConfigYesNo(default = False)
	config.recording.filename_composition = ConfigSelection(default = "standard", choices = [
		("standard", _("standard")),
		("short", _("Short filenames")),
		("long", _("Long filenames")) ] )
Esempio n. 11
0
	def __init__(self):
		# Is called on instance creation
		ServiceBase.__init__(self)
		#self.sockets = []

		# Default configuration
		self.setOption('growlhost', NoSave(ConfigText(default="host", fixed_size=False)), _("Growl Host name"))
		self.setOption('growlport', NoSave(ConfigNumber(default=23053)), _("Growl Port"))
		self.setOption('timeout', NoSave(ConfigNumber(default=3)), _("Timeout"))
		self.setOption('password', NoSave(ConfigPassword()), _("Password"))
		self.setOption('sticky', NoSave(ConfigYesNo(default=True)), _("Send as sticky"))
		self.setOption('priority', NoSave(ConfigNumber(default=1)), _("Send with priority"))
Esempio n. 12
0
def InitOsd():
	SystemInfo["CanChange3DOsd"] = (access('/proc/stb/fb/3dmode', R_OK) or access('/proc/stb/fb/primary/3d', R_OK)) and True or False

	def languageNotifier(configElement):
		language.activateLanguage(configElement.value)

	config.osd = ConfigSubsection()
	config.osd.language = ConfigText(default = "en_GB")
	config.osd.language.addNotifier(languageNotifier)
	config.osd.dst_left = ConfigSelectionNumber(default = 0, stepwidth = 1, min = 0, max = 720, wraparound = False)
	config.osd.dst_width = ConfigSelectionNumber(default = 720, stepwidth = 1, min = 0, max = 720, wraparound = False)
	config.osd.dst_top = ConfigSelectionNumber(default = 0, stepwidth = 1, min = 0, max = 576, wraparound = False)
	config.osd.dst_height = ConfigSelectionNumber(default = 576, stepwidth = 1, min = 0, max = 576, wraparound = False)
	config.osd.alpha = ConfigSelectionNumber(default = 255, stepwidth = 1, min = 0, max = 255, wraparound = False)
	config.av.osd_alpha = NoSave(ConfigNumber(default = 255))
	config.osd.threeDmode = ConfigSelection([("off", _("Off")), ("auto", _("Auto")), ("sidebyside", _("Side by Side")),("topandbottom", _("Top and Bottom"))], "auto")
	config.osd.threeDznorm = ConfigSlider(default = 50, increment = 1, limits = (0, 100))
	config.osd.show3dextensions = ConfigYesNo(default = False)

	def set3DMode(configElement):
		if SystemInfo["CanChange3DOsd"] and getBoxType() not in ('spycat'):
			print '[UserInterfacePositioner] Setting 3D mode:',configElement.value
			file3d = fileCheck('/proc/stb/fb/3dmode') or fileCheck('/proc/stb/fb/primary/3d')
			f = open(file3d, "w")
			f.write(configElement.value)
			f.close()
	config.osd.threeDmode.addNotifier(set3DMode)

	def set3DZnorm(configElement):
		if SystemInfo["CanChange3DOsd"] and getBoxType() not in ('spycat'):
			print '[UserInterfacePositioner] Setting 3D depth:',configElement.value
			f = open("/proc/stb/fb/znorm", "w")
			f.write('%d' % int(configElement.value))
			f.close()
	config.osd.threeDznorm.addNotifier(set3DZnorm)
Esempio n. 13
0
def initWeatherConfig():
    config.plugins.MetrixWeather = ConfigSubsection()
    #MetrixWeather
    config.plugins.MetrixWeather.enabled = ConfigYesNo(default=False)
    config.plugins.MetrixWeather.weathercity = ConfigText(
        default='Hamburg, Germany')
    config.plugins.MetrixWeather.tempUnit = ConfigSelection(
        default="Celsius",
        choices=[("Celsius", _("Celsius")), ("Fahrenheit", _("Fahrenheit"))])
    config.plugins.MetrixWeather.refreshInterval = ConfigNumber(default=60)
    config.plugins.MetrixWeather.lastUpdated = ConfigText(
        default="2001-01-01 01:01:01")

    ## RENDERER CONFIG:
    config.plugins.MetrixWeather.currentLocation = ConfigText(default="N/A")
    config.plugins.MetrixWeather.currentWeatherCode = ConfigText(default="(")
    config.plugins.MetrixWeather.currentWeatherText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.currentWeatherTemp = ConfigText(default="0")
    config.plugins.MetrixWeather.forecastTodayCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecastTodayText = ConfigText(default="N/A")
    config.plugins.MetrixWeather.forecastTodayTempMin = ConfigText(default="0")
    config.plugins.MetrixWeather.forecastTodayTempMax = ConfigText(default="0")
    config.plugins.MetrixWeather.forecastTomorrowCode = ConfigText(default="(")
    config.plugins.MetrixWeather.forecastTomorrowText = ConfigText(
        default="N/A")
    config.plugins.MetrixWeather.forecastTomorrowTempMin = ConfigText(
        default="0")
    config.plugins.MetrixWeather.forecastTomorrowTempMax = ConfigText(
        default="0")

    config.plugins.MetrixWeather.save()
    configfile.save()
Esempio n. 14
0
    def initialize_entry(self, setting, entry):
        # fix dotted id
        entry['id'] = entry['id'].replace('.', '_')

        if entry['type'] == 'bool':
            setattr(setting, entry['id'], ConfigYesNo(default=(entry['default'] == 'true')))
            entry['setting_id'] = getattr(setting, entry['id'])

        elif entry['type'] == 'text':
            if entry['option'] == 'true':
                setattr(setting, entry['id'], ConfigPassword(default=entry['default'], fixed_size=False))
            else:
                setattr(setting, entry['id'], ConfigText(default=entry['default'], fixed_size=False))
            entry['setting_id'] = getattr(setting, entry['id'])

        elif entry['type'] == 'enum':
            choicelist = [(str(idx), self._get_label(e).encode('utf-8')) for idx, e in enumerate(entry['lvalues'].split("|"))]
            setattr(setting, entry['id'], ConfigSelection(default=entry['default'], choices=choicelist))
            entry['setting_id'] = getattr(setting, entry['id'])

        elif entry['type'] == 'labelenum':
            choicelist = [(self._get_label(e).encode('utf-8'), self._get_label(e).encode('utf-8')) for e in entry['values'].split("|")]
            setattr(setting, entry['id'], ConfigSelection(default=entry['default'], choices=choicelist))
            entry['setting_id'] = getattr(setting, entry['id'])

        elif entry['type'] == 'ipaddress':
            setattr(setting, entry['id'], ConfigIP(default=map(int, entry['default'].split('.')), auto_jump=True))
            entry['setting_id'] = getattr(setting, entry['id'])

        elif entry['type'] == 'number':
            setattr(setting, entry['id'], ConfigNumber(default=int(entry['default'])))
            entry['setting_id'] = getattr(setting, entry['id'])
        else:
            log.error('%s cannot initialize unknown entry %s', self, entry['type'])
Esempio n. 15
0
	def __init__(self):
		# Is called on instance creation
		ControllerBase.__init__(self)
		
		# Default configuration
		self.setOption( 'wakehdd',  NoSave(ConfigYesNo(  default = False )),                                  _("Allow HDD wake up") )
		self.setOption( 'path',     NoSave(ConfigText(   default = "/media/hdd/movie", fixed_size = False )), _("Where to check free space") )
		self.setOption( 'limit',    NoSave(ConfigNumber( default = 100 )),                                    _("Free space limit in GB") )
Esempio n. 16
0
    def __init__(self, session, instance, fwd):
        Screen.__init__(self, session)

        self.session = session
        self.infobarInstance = instance
        self.fwd = fwd
        if isinstance(session.current_dialog, MoviePlayer):
            self.dvd = False
            self.vdb = False
        elif DVDPlayer is not None and isinstance(session.current_dialog,
                                                  DVDPlayer):
            self.dvd = True
            self.vdb = False
        else:
            self.dvd = False
            self.vdb = True
        self.percent = 0.0
        self.length = None
        service = session.nav.getCurrentService()
        if service:
            self.seek = service.seek()
            if self.seek:
                self.length = self.seek.getLength()
                position = self.seek.getPlayPosition()
                if self.length and position:
                    if int(position[1]) > 0:
                        self.percent = float(position[1]) * 100.0 / float(
                            self.length[1])

        self.minuteInput = ConfigNumber(default=5)
        self.positionEntry = ConfigSelection(choices=["<>"], default="<>")
        if self.fwd:
            txt = _("Jump x minutes forward:")
        else:
            txt = _("Jump x minutes back:")
        ConfigListScreen.__init__(self, [
            getConfigListEntry(txt, self.minuteInput),
            getConfigListEntry(_("Go to position:"), self.positionEntry),
            getConfigListEntry(_("Sensibility:"),
                               config.plugins.Seekbar.sensibility),
            getConfigListEntry(_("Overwrite left and right buttons:"),
                               config.plugins.Seekbar.overwrite_left_right)
        ])

        self["cursor"] = MovingPixmap()
        self["time"] = Label()

        self["actions"] = ActionMap(["WizardActions"], {"back": self.exit}, -1)

        self.cursorTimer = eTimer()
        self.cursorTimer_conn = self.cursorTimer.timeout.connect(
            self.updateCursor)
        self.cursorTimer.start(200, False)

        self.onLayoutFinish.append(self.firstStart)
Esempio n. 17
0
 def __init__(self, session, name, vol):
     self.skin = Change_volume.skin
     Screen.__init__(self, session)
     self.offset = ConfigNumber(default=0)
     self.offset.setValue(str(offset))
     self.Clist = []
     self.Clist.append(getConfigListEntry(_(name), self.offset))
     ConfigListScreen.__init__(self, self.Clist)
     self["key_red"] = StaticText(_("Cancel"))
     self["key_green"] = StaticText(_("Ok"))
     self["key_yellow"] = StaticText(_("+/-"))
     self["actions"] = ActionMap(
         ["ColorActions", "SetupActions"], {
             "ok": self.ok,
             "cancel": self.cancel,
             "green": self.greenPressed,
             "red": self.cancel,
             "yellow": self.yellowPressed,
         }, -2)
     self.onShown.append(self.setWindowTitle)
def initConfig():
    config_root = config.plugins.openHAB = ConfigSubsection()
    config_root.host = ConfigText(fixed_size=False)
    config_root.port = ConfigNumber(8080)
    config_root.user = ConfigText(fixed_size=False)
    config_root.password = ConfigPassword()
    config_root.sitemap = ConfigText(default="default", fixed_size=False)
    config_root.refresh = ConfigIntSelection([1, 2, 3, 5, 10], default=3)
    config_root.dimmer_step = ConfigIntSelection([1, 2, 3, 5, 10], default=5)
    config_root.debug = ConfigIntSelection([(OFF_LEVEL, _("no")), (DEBUG_LEVEL, _("debug")), (TRACE_LEVEL, _("trace"))], 
                                           default=OFF_LEVEL)
    config_root.graphic_sliders = ConfigYesNo(default=False)
    return config_root
Esempio n. 19
0
def InitPreferences():
    config.sifteam = ConfigSubsection()
    config.sifteam.emudelay = ConfigSelection(choices={
        "0": _("Enigma2 boot"),
        "015": _("After 15 seconds"),
        "030": _("After 30 seconds"),
        "045": _("After 45 seconds"),
        "060": _("After 1 minute"),
        "120": _("After 2 minutes")
    },
                                              default="0")

    config.sifteam.switch_4_3_letterbox = ConfigYesNo(True)
    config.sifteam.switch_4_3_panscan = ConfigYesNo(True)
    config.sifteam.switch_16_9 = ConfigYesNo(False)
    config.sifteam.switch_16_9_always = ConfigYesNo(True)
    config.sifteam.switch_16_10_letterbox = ConfigYesNo(False)
    config.sifteam.switch_16_10_panscan = ConfigYesNo(False)
    config.sifteam.switch_16_9_letterbox = ConfigYesNo(True)

    config.sifteam.addons_packages_sort = ConfigSelection(choices={
        "name":
        _("Name"),
        "rank":
        _("Rank"),
        "ratings":
        _("Ratings"),
        "downloads":
        _("Downloads")
    },
                                                          default=0)

    config.sifteam.skindevelopermode = ConfigYesNo(False)

    config.sifteam.cloud = ConfigSubsection()
    config.sifteam.cloud.username = ConfigText(fixed_size=False)
    config.sifteam.cloud.password = ConfigText(fixed_size=False)
    config.sifteam.cloud.softwareupdates = ConfigYesNo(False)
    config.sifteam.cloud.settingsupdates = ConfigYesNo(False)
    config.sifteam.cloud.crashlogs = ConfigYesNo(False)
    config.sifteam.cloud.timeautoupdates = ConfigTime(default=18000)

    config.sifteam.settings = ConfigSubsection()
    config.sifteam.settings.keepterrestrial = ConfigYesNo(False)
    config.sifteam.settings.keepsatellitesxml = ConfigYesNo(False)
    config.sifteam.settings.keepcablesxml = ConfigYesNo(False)
    config.sifteam.settings.keepterrestrialxml = ConfigYesNo(False)
    config.sifteam.settings.keepbouquets = ConfigText("", False)
    config.sifteam.settings.currentsettings = ConfigNumber(default=-1)
    config.sifteam.settings.currentsettingsdate = ConfigText(fixed_size=False)
Esempio n. 20
0
    def __init__(self, session, instance, fwd):
        Screen.__init__(self, session)
        self.skinName = SkinTools.appendResolution(
            "AdvancedMovieSelectionSeekbar")
        self.session = session
        self.infobarInstance = instance
        self.fwd = fwd
        if isinstance(session.current_dialog, MoviePlayer):
            self.dvd = False
        else:
            self.dvd = True
        self.percent = 0.0
        self.length = None
        service = session.nav.getCurrentService()
        if service:
            self.seek = service.seek()
            if self.seek:
                self.length = self.seek.getLength()
                position = self.seek.getPlayPosition()
                if self.length and position:
                    if int(position[1]) > 0:
                        self.percent = float(position[1]) * 100.0 / float(
                            self.length[1])

        self.minuteInput = ConfigNumber(default=5)
        self.positionEntry = ConfigSelection(
            choices=[_("Use arrow left/right for position")],
            default=_("Use arrow left/right for position"))
        if self.fwd:
            txt = _("Jump x minutes forward (OK for seek):")
        else:
            txt = _("Jump x minutes back (OK for seek):")
        ConfigListScreen.__init__(self, [
            getConfigListEntry(txt, self.minuteInput),
            getConfigListEntry(_("Go manual to position (OK for seek):"),
                               self.positionEntry)
        ])
        self["cursor"] = MovingPixmap()
        self["time"] = Label()
        self["actions"] = ActionMap(["WizardActions"], {"back": self.exit}, -1)
        self.cursorTimer = eTimer()
        self.cursorTimer.callback.append(self.updateCursor)
        self.cursorTimer.start(200, False)
        self.onShown.append(self.setWindowTitle)
        self.onLayoutFinish.append(self.firstStart)
        self.firstime = True
        self.onExecBegin.append(self.__onExecBegin)
Esempio n. 21
0
 def initConfig(self):
     self.nameCfg = NoSave(ConfigText(default="IPTV", fixed_size=False))
     self.protocolCfg = NoSave(
         ConfigSelection(default=self.protocol,
                         choices=[('http://', _('http://')),
                                  ('https://', _('https://'))]))
     self.serverCfg = NoSave(
         ConfigText(default=self.server, fixed_size=False))
     self.portCfg = NoSave(ConfigNumber(default=self.port))
     self.usernameCfg = NoSave(
         ConfigText(default=self.username, fixed_size=False))
     self.passwordCfg = NoSave(
         ConfigText(default=self.password, fixed_size=False))
     self.outputCfg = NoSave(
         ConfigSelection(default=self.output,
                         choices=[('ts', 'ts'), ('m3u8', 'm3u8')]))
     self.createSetup()
Esempio n. 22
0
	def __init__(self, session, name, vol):
		self.skin = Change_volume.skin
		Screen.__init__(self, session)
		self.offset = ConfigNumber(default="0")
		global offset
		self.offset.setValue(str(offset))
		self.Clist = []
		self.Clist.append(getConfigListEntry(_(name), self.offset))
		ConfigListScreen.__init__(self, self.Clist)
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Ok"))
		self["key_yellow"] = StaticText(_("+/-"))
		self["actions"] = ActionMap(["ColorActions","SetupActions"],
		{
			"ok": self.ok,
			"cancel": self.cancel,
			"green": self.greenPressed,
			"red": self.cancel,
			"yellow": self.yellowPressed,
		}, -2)
		self.onShown.append(self.setWindowTitle)
Esempio n. 23
0
from Components.ConfigList import ConfigListScreen
from Components.MenuList import MenuList
from Components.Sources.StaticText import StaticText
from Components.config import config, ConfigNumber, ConfigSelectionNumber, getConfigListEntry
from Plugins.Plugin import PluginDescriptor

from enigma import setAnimation_current, setAnimation_speed

# default = slide to left
g_default = {
        "current": 6,
        "speed"  : 20,
}
g_max_speed = 30

config.misc.window_animation_default = ConfigNumber(default=g_default["current"])
config.misc.window_animation_speed = ConfigSelectionNumber(1, g_max_speed, 1, default=g_default["speed"])

class AnimationSetupConfig(ConfigListScreen, Screen):
	skin=   """
		<screen position="center,center" size="600,140" title="Animation Settings">
			<widget name="config" position="0,0" size="600,100" scrollbarMode="showOnDemand" />

			<ePixmap pixmap="skin_default/buttons/red.png" position="0,100" size="140,40" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/green.png" position="140,100" size="140,40" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,100" size="140,40" alphatest="on" />

			<widget source="key_red" render="Label" position="0,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#9f1313" transparent="1" />
			<widget source="key_green" render="Label" position="140,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#1f771f" transparent="1" />
			<widget source="key_yellow" render="Label" position="280,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#a08500" transparent="1" />
		</screen>
Esempio n. 24
0
        ("Beyonwiz", "T2"): 31,
        ("Beyonwiz", "T3"): 22,
        ("Beyonwiz", "T4"): 30,
        ("Beyonwiz", "U4"): 36,
        ("Beyonwiz", "V2"): 38,
    }.get((getMachineBrand(), getMachineName()), 39)

config.plugins.icetv = ConfigSubsection()

config.plugins.icetv.server = ConfigSubsection()
config.plugins.icetv.server.name = ConfigText(default="api.icetv.com.au")

config.plugins.icetv.member = ConfigSubsection()
config.plugins.icetv.member.email_address = ConfigText(show_help=False, fixed_size=False)
config.plugins.icetv.member.token = ConfigText()
config.plugins.icetv.member.id = ConfigNumber()
config.plugins.icetv.member.region_id = ConfigNumber()
config.plugins.icetv.member.country = ConfigText(default="AUS")
config.plugins.icetv.member.send_logs = ConfigYesNo(default=True)

config.plugins.icetv.member.password = NoSave(ConfigPassword(censor="●", show_help=False, fixed_size=False))

config.plugins.icetv.device = ConfigSubsection()
config.plugins.icetv.device.label = ConfigText(default="%s %s" % (getMachineBrand(), getMachineName()), show_help=False)
config.plugins.icetv.device.id = ConfigNumber()
config.plugins.icetv.device.type_id = ConfigNumber(default=getIceTVDeviceType())

config.plugins.icetv.last_update_time = ConfigNumber()
if config.plugins.icetv.last_update_time.value != 0:
    config.plugins.icetv.last_update_time.value = 0
    config.plugins.icetv.last_update_time.save()
Esempio n. 25
0
    def createConfig(self):
        self.list = []
        self.optionList = []

        if self.addEntry:
            self.devicename = NoSave(ConfigText(default=""))
            self.mountpoint = NoSave(ConfigText(default=""))
            self.fstype = NoSave(
                ConfigSelection([("auto", "auto"), ("ext2", "ext2"),
                                 ("ext3", "ext3"), ("ext4", "ext4"),
                                 ("swap", "swap"), ("tmpfs", "tmpfs"),
                                 ("proc", "proc"), ("cifs", "cifs"),
                                 ("nfs", "nfs"), ("jffs2", "jffs2"),
                                 ("usbfs", "usbfs"), ("devpts", "devpts"),
                                 ("vfat", "vfat"), ("fat", "fat"),
                                 ("ntfs", "ntfs"), ("noauto", "no auto"),
                                 ("xfs", "xfs")],
                                default="auto"))
            self.optionList.append(NoSave(ConfigText(default="defaults")))

            self.dumpfreq = NoSave(ConfigNumber(default=0))
            self.passnum = NoSave(
                ConfigSelection([("0", "0"), ("1", "1"), ("2", "2")],
                                default="0"))
        else:
            self.devicename = NoSave(
                ConfigText(default=entryList[self.selectedEntry][0]))
            self.mountpoint = NoSave(
                ConfigText(default=entryList[self.selectedEntry][1]))
            self.fstype = NoSave(
                ConfigSelection([("auto", "auto"), ("ext2", "ext2"),
                                 ("ext3", "ext3"), ("ext4", "ext4"),
                                 ("swap", "swap"), ("tmpfs", "tmpfs"),
                                 ("proc", "proc"), ("cifs", "cifs"),
                                 ("nfs", "nfs"), ("jffs2", "jffs2"),
                                 ("usbfs", "usbfs"), ("devpts", "devpts"),
                                 ("vfat", "vfat"), ("fat", "fat"),
                                 ("ntfs", "ntfs"), ("noauto", "no auto"),
                                 ("xfs", "xfs"), ("rootfs", "rootfs"),
                                 ("sysfs", "sysfs")],
                                default=entryList[self.selectedEntry][2]))
            splitoptions = entryList[self.selectedEntry][3].split(",")
            for option in splitoptions:
                self.optionList.append(NoSave(ConfigText(default=option)))
            self.dumpfreq = NoSave(
                ConfigNumber(default=int(entryList[self.selectedEntry][4])))
            self.passnum = NoSave(
                ConfigSelection([("0", "0"), ("1", "1"), ("2", "2")],
                                default=entryList[self.selectedEntry][5]))

        self.list.append(
            getConfigListEntry(_("device name: "), self.devicename))
        self.list.append(
            getConfigListEntry(_("mount point: "), self.mountpoint))
        self.list.append(
            getConfigListEntry(_("file system type: "), self.fstype))
        self.list.append((_("options: "), ))
        i = 1
        for entry in self.optionList:
            self.list.append(getConfigListEntry(_("option %d: ") % (i), entry))
            i += 1
        self.list.append(
            getConfigListEntry(_("dump frequency (in days): "), self.dumpfreq))
        self.list.append(getConfigListEntry(_("pass num: "), self.passnum))

        self["config"].setList(self.list)
Esempio n. 26
0
from Screens.Screen import Screen
from Plugins.Plugin import PluginDescriptor
from Components.PluginComponent import plugins
from Components.config import config, getConfigListEntry, ConfigSubsection, ConfigYesNo, ConfigNumber
from Components.ConfigList import ConfigListScreen
from Components.ActionMap import ActionMap
from Components.Sources.StaticText import StaticText
from CleanupWizard import checkFreeSpaceAvailable

config.plugins.cleanupwizard = ConfigSubsection()
config.plugins.cleanupwizard.enable = ConfigYesNo(default = True)
config.plugins.cleanupwizard.threshold = ConfigNumber(default = 2048)

freeSpace = checkFreeSpaceAvailable()
print "[CleanupWizard] freeSpaceAvailable-->",freeSpace

if freeSpace is None:
	internalMemoryExceeded = 0
elif int(freeSpace) <= config.plugins.cleanupwizard.threshold.value:
	internalMemoryExceeded = 1
else:
	internalMemoryExceeded = 0

class CleanupWizardConfiguration(Screen, ConfigListScreen):

	skin = """
		<screen name="CleanupWizardConfiguration" position="center,center" size="560,440" title="CleanupWizard settings" >
			<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
			<widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
			<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
Esempio n. 27
0
from Screens.InputBox import InputBox
from Screens.MessageBox import MessageBox
from Screens.Screen import Screen
from Screens.Standby import TryQuitMainloop
from Tools.Directories import *
from Tools.LoadPixmap import LoadPixmap
from Tools.WeatherID import get_woeid_from_yahoo
from Tools import Notifications
from Tools.Notifications import AddPopup
from os import listdir, remove, rename, system, path, symlink, chdir, makedirs, mkdir
import shutil

cur_skin = config.skin.primary_skin.value.replace('/skin.xml', '')

config.plugins.AXBlue = ConfigSubsection()
config.plugins.AXBlue.refreshInterval = ConfigNumber(default=10)
config.plugins.AXBlue.woeid = ConfigNumber(default=638242)
config.plugins.AXBlue.tempUnit = ConfigSelection(default="Celsius",
                                                 choices=[("Celsius",
                                                           _("Celsius")),
                                                          ("Fahrenheit",
                                                           _("Fahrenheit"))])


def Plugins(**kwargs):
    return [
        PluginDescriptor(
            name=_("AXBlue FHD Configtool"),
            description=_("Personalize your AXBlue FHD (Skin by stein17)"),
            where=[PluginDescriptor.WHERE_PLUGINMENU],
            icon="plugin.png",
Esempio n. 28
0
config.plugins.ShowClock = ConfigSubsection()
config.plugins.ShowClock.name = ConfigText(default=_('Show Clock setup'),
                                           fixed_size=False,
                                           visible_width=80)
config.plugins.ShowClock.description = ConfigText(
    default=_('Push "Exit" long to show/hide clock'),
    fixed_size=False,
    visible_width=80)
config.plugins.ShowClock.menu = ConfigSelection(default='plugin',
                                                choices=[('plugin',
                                                          _('Plugin menu')),
                                                         ('extensions',
                                                          _('Extensions menu'))
                                                         ])
config.plugins.ShowClock.showTimeout = ConfigNumber(default=10)

width = getDesktop(0).size().width()
height = getDesktop(0).size().height()
config.plugins.ShowClock.position_x = ConfigNumber(default=int(width * 0.7))
config.plugins.ShowClock.position_y = ConfigNumber(default=45)
if debug:
    print(
        pluginPrintname, "Clock X,Y position: %d,%d" %
        (config.plugins.ShowClock.position_x.value,
         config.plugins.ShowClock.position_y.value))

##############################################################################


class ShowClockSetup(Screen, ConfigListScreen):  # config
Esempio n. 29
0
config.plugins.seriesplugin.caching = ConfigYesNo(default=True)
config.plugins.seriesplugin.caching_expiration = ConfigSelectionNumber(
    0, 48, 1, default=6)

config.plugins.seriesplugin.debug_prints = ConfigYesNo(default=False)
config.plugins.seriesplugin.write_log = ConfigYesNo(default=False)
config.plugins.seriesplugin.log_file = ConfigText(
    default="/tmp/seriesplugin.log", fixed_size=False)
config.plugins.seriesplugin.log_reply_user = ConfigText(
    default="Dreambox User", fixed_size=False)
config.plugins.seriesplugin.log_reply_mail = ConfigText(
    default="*****@*****.**", fixed_size=False)

# Internal
config.plugins.seriesplugin.lookup_counter = ConfigNumber(default=0)
#config.plugins.seriesplugin.uid                       = ConfigText(default = str(time()), fixed_size = False)

config.plugins.seriesplugin.proxy_url = ConfigText(
    default='http://www.serienserver.de/proxy/proxy.php', fixed_size=False)
config.plugins.seriesplugin.serienserver_url = ConfigText(
    default='http://www.serienserver.de/cache/cache.php', fixed_size=False)
config.plugins.seriesplugin.xmltv_url = ConfigText(
    default='http://www.serienserver.de/xmltv/wunschliste.xml',
    fixed_size=False)


def localeInit():
    lang = language.getLanguage(
    )[:2]  # getLanguage returns e.g. "fi_FI" for "language_country"
    os_environ[
Esempio n. 30
0
from Screens.InputBox import InputBox
from Screens.MessageBox import MessageBox
from Screens.Screen import Screen
from Screens.Standby import TryQuitMainloop
from Tools.Directories import *
from Tools.LoadPixmap import LoadPixmap
from Tools.WeatherID import get_woeid_from_yahoo
from Tools import Notifications
from Tools.Notifications import AddPopup
from os import listdir, remove, rename, system, path, symlink, chdir, makedirs, mkdir
import shutil

cur_skin = config.skin.primary_skin.value.replace('/skin.xml', '')

config.plugins.Steampunk = ConfigSubsection()
config.plugins.Steampunk.refreshInterval = ConfigNumber(default=10)
config.plugins.Steampunk.woeid = ConfigNumber(default = 638242)
config.plugins.Steampunk.tempUnit = ConfigSelection(default="Celsius", choices = [
                                ("Celsius", _("Celsius")),
                                ("Fahrenheit", _("Fahrenheit"))
                                ])

def Plugins(**kwargs):
    return [PluginDescriptor(name=_("Steampunk HD Configtool"), description=_("Personalize your Steampunk HD (Skin by stein17)"), where = [PluginDescriptor.WHERE_PLUGINMENU],
    icon="plugin.png", fnc=main)]

def main(session, **kwargs):
    if config.skin.primary_skin.value == "Steampunk/skin.xml":
        session.open(Steampunk_Config)
    else:
        AddPopup(_('Please activate Steampunk HD Skin before run the Config Plugin'), type=MessageBox.TYPE_ERROR, timeout=10)
Esempio n. 31
0
from Components.Pixmap import Pixmap
from enigma import eTimer, eListboxPythonMultiContent, getDesktop, gFont, loadPNG
from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
from Screens.MessageBox import MessageBox
from Screens.Console import Console
import urllib
from Components.Label import Label
from Components.ServiceEventTracker import ServiceEventTracker
from enigma import iPlayableService, iServiceInformation, eServiceReference, eListboxPythonMultiContent, getDesktop, gFont, loadPNG
from Tools.LoadPixmap import LoadPixmap
from Components.ConfigList import ConfigList, ConfigListScreen
from Components.config import config, ConfigDirectory, ConfigSubsection, ConfigSubList, ConfigEnableDisable, ConfigNumber, ConfigText, ConfigSelection, ConfigYesNo, ConfigPassword, getConfigListEntry, configfile

config.plugins.Cradio = ConfigSubsection()
config.plugins.Cradio.stations = ConfigSubList()
config.plugins.Cradio.stations_count = ConfigNumber(default=0)
currversion = '3.0'
currxmlversion = '3.0'


def initProfileConfig():
    s = ConfigSubsection()
    s.name = ConfigText(default='')
    s.code = ConfigText(default='')
    config.plugins.Cradio.stations.append(s)
    return s


def initConfig():
    count = config.plugins.Cradio.stations_count.value
    if count != 0:
Esempio n. 32
0
_session = None
# Plugins
from Components.PluginComponent import plugins
from Plugins.Plugin import PluginDescriptor


# Calculate default begin/end
from time import time, localtime, mktime

#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: