Exemplo n.º 1
0
def initWeatherPluginEntryConfig():
	s = ConfigSubsection()
	s.city = ConfigText(default = "Heidelberg", visible_width = 100, fixed_size = False)
	s.degreetype = ConfigSelection(choices = [("C", _("metric system")), ("F", _("imperial system"))], default = "C")
	s.weatherlocationcode = ConfigText(default = "", visible_width = 100, fixed_size = False)
	config.plugins.WeatherPlugin.Entry.append(s)
	return s
Exemplo n.º 2
0
def ftpserverFromURI(uri, name = "", save = True):
	scheme, host, port, path, username, password = _parse(uri, defaultPort = 21)
	
	newServer = ConfigSubsection()
	if save:
		config.plugins.ftpbrowser.server.append(newServer)
	newServer.name = ConfigText(fixed_size = False)
	newServer.name.value = name or host
	newServer.address = ConfigText(fixed_size = False)
	newServer.address.value = host
	newServer.username = ConfigText(fixed_size = False)
	newServer.username.value = username
	newServer.password = ConfigPassword()
	newServer.password.value = password
	newServer.port = ConfigInteger(0, (0, 65535))
	newServer.port.value = port
	newServer.passive = ConfigYesNo(False)
	newServer.connectiontype = ConfigYesNo(False)

	if save:
		newServer.save()
		config.plugins.ftpbrowser.servercount.value += 1
		config.plugins.ftpbrowser.servercount.save()

	return FTPServer(newServer)
Exemplo n.º 3
0
def initWeatherPluginEntryConfig():
    s = ConfigSubsection()
    s.city = ConfigText(default='Heidelberg', visible_width=100, fixed_size=False)
    s.degreetype = ConfigSelection(choices=[('C', _('metric system')), ('F', _('imperial system'))], default='C')
    s.weatherlocationcode = ConfigText(default='', visible_width=100, fixed_size=False)
    config.plugins.WeatherPlugin.Entry.append(s)
    return s
Exemplo n.º 4
0
	def new(self):
		l = config.plugins.simpleRSS.feed
		s = ConfigSubsection()
		s.uri = ConfigText(default="http://", fixed_size = False)
		s.autoupdate = ConfigOnOff(default=True)
		id = len(l)
		l.append(s)

		self.session.openWithCallback(self.conditionalNew, RSSFeedEdit, id)
Exemplo n.º 5
0
def createPage():
    """ Create and return a configuration page object """
    s = ConfigSubsection()
    s.uri   = ConfigText(default="http://", fixed_size=False)
    s.title = ConfigText(
        default = "Page #" + str(len(config.plugins.CurlyTx.pages) + 1),
        fixed_size = False
        )
    s.fontSize = ConfigInteger(20, (1, 100))
    return s
Exemplo n.º 6
0
def addHost(name):
    s = ConfigSubsection()
    s.name = ConfigText(default=name, fixed_size=False)
    s.enable_incoming = ConfigYesNo(default=False)
    s.enable_outgoing = ConfigYesNo(default=False)
    s.address = ConfigText(fixed_size=False)
    s.password = ConfigPassword()
    s.protocol = ConfigSelection(
        default="growl",
        choices=[
            ("growl", "Growl"),
            ("gntp", "GNTP"),
            ("snarl", "Snarl"),
            ("prowl", "Prowl"),
            ("syslog", "Syslog UDP"),
        ],
    )
    s.level = ConfigSelection(
        default="-1",
        choices=[
            ("-1", _("Low (Yes/No)")),
            ("0", _("Normal (Information)")),
            ("1", _("High (Warning)")),
            ("2", _("Highest (Emergency)")),
        ],
    )
    s.blacklist = ConfigSet(choices=[])
    config.plugins.growlee.hosts.append(s)
    return s
	def new(self):
		newUserConfigSubsection = ConfigSubsection()
		config.plugins.youtubeplayer.users.append(newUserConfigSubsection)
		newUserConfigSubsection.name = ConfigText("User " + str(self.__getUserCount()), False)
		if newUserConfigSubsection.name.value == newUserConfigSubsection.name.default:
			newUserConfigSubsection.name.default = ""
		newUserConfigSubsection.email = ConfigText("", False)
		newUserConfigSubsection.password = ConfigText("", False)
		
		newUser = YouTubeUser(newUserConfigSubsection)

		self.userlist.append(newUser)

		return newUser
Exemplo n.º 8
0
def addFeed(address, auto = False):
	l = config.plugins.simpleRSS.feed

	# Create new Item
	s = ConfigSubsection()
	s.uri = ConfigText(default="http://", fixed_size = False)
	s.autoupdate = ConfigOnOff(default=True)

	# Set values
	s.uri.value = address
	s.autoupdate.value = auto

	# Save
	l.append(s)
	l.save()
Exemplo n.º 9
0
	def createConfig(self):
		def setVlt(fancontrol, fanid, configElement):
			fancontrol.setVoltage(fanid, configElement.value)
		def setPWM(fancontrol, fanid, configElement):
			fancontrol.setPWM(fanid, configElement.value)

		config.fans = ConfigSubList()
		for fanid in range(self.getFanCount()):
			fan = ConfigSubsection()
			fan.vlt = ConfigSlider(default = 15, increment = 5, limits = (0, 255))
			fan.pwm = ConfigSlider(default = 0, increment = 5, limits = (0, 255))
			fan.vlt_standby = ConfigSlider(default = 5, increment = 5, limits = (0, 255))
			fan.pwm_standby = ConfigSlider(default = 0, increment = 5, limits = (0, 255))
			fan.vlt.addNotifier(boundFunction(setVlt, self, fanid))
			fan.pwm.addNotifier(boundFunction(setPWM, self, fanid))
			config.fans.append(fan)
Exemplo n.º 10
0
	def __init__(self, session, args = 0):
		self.session = session
		self.setup_title = _("Movie List Configuration")
		Screen.__init__(self, session)
		cfg = ConfigSubsection()
		self.cfg = cfg
		# this kludge is needed because ConfigSelection only takes numbers
		# and someone appears to be fascinated by 'enums'.
		cfg.moviesort = ConfigSelection(default=str(config.movielist.moviesort.value), choices = [
			(str(MovieList.SORT_RECORDED), _("sort by date")),
			(str(MovieList.SORT_ALPHANUMERIC), _("alphabetic sort")),
			(str(MovieList.SHUFFLE), _("shuffle"))])
		cfg.listtype = ConfigSelection(default=str(config.movielist.listtype.value), choices = [
			(str(MovieList.LISTTYPE_ORIGINAL), _("list style default")),
			(str(MovieList.LISTTYPE_COMPACT_DESCRIPTION), _("list style compact with description")),
			(str(MovieList.LISTTYPE_COMPACT), _("list style compact")),
			(str(MovieList.LISTTYPE_MINIMAL), _("list style single line"))])
		cfg.description = ConfigYesNo(default=(config.movielist.description.value != MovieList.HIDE_DESCRIPTION))
		configList = [
			getConfigListEntry(_("Sort"), cfg.moviesort),
			getConfigListEntry(_("show extended description"), cfg.description),
			getConfigListEntry(_("Type"), cfg.listtype),
			getConfigListEntry(_("Load Length of Movies in Movielist"), config.usage.load_length_of_movies_in_moviellist),
			getConfigListEntry(_("Show status icons in Movielist"), config.usage.show_icons_in_movielist),
			getConfigListEntry(_("Show icon for new/unseen items"), config.usage.movielist_unseen),
			getConfigListEntry(_("Play audio in background"), config.movielist.play_audio_internal),
			]
		for k,v in userDefinedButtons.items():
			configList.append(getConfigListEntry(_(k), v))
		ConfigListScreen.__init__(self, configList, session=session, on_change = self.changedEntry)
		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("Ok"))
		self["key_yellow"] = Button("")
		self["key_blue"] = Button("")
		self["statusbar"] = Label()
		self["status"] = Label()
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"red": self.cancel,
			"green": self.save,
			"save": self.save,
			"cancel": self.cancel,
			"ok": self.save,
		}, -2)
		self.onChangedEntry = []
Exemplo n.º 11
0
	def createConfig(self, foo):
		global tuning
		if not tuning:
			tuning = ConfigSubsection()
			tuning.type = ConfigSelection(
				default = "manual_transponder",
				choices = { "manual_transponder" : _("Manual transponder"),
							"predefined_transponder" : _("Predefined transponder") } )
			tuning.sat = ConfigSatlist(list=nimmanager.getRotorSatListForNim(self.feid))
			tuning.sat.addNotifier(self.tuningSatChanged)
			self.updateTransponders()
		orb_pos = self.fe_data.get("orbital_position", None)
		if orb_pos is not None:
			for x in nimmanager.getRotorSatListForNim(self.feid):
				opos = str(orb_pos)
				if x[0] == orb_pos and tuning.sat.value != opos:
					tuning.sat.value = opos
			del self.fe_data["orbital_position"]
		ScanSetup.createConfig(self, self.fe_data)
Exemplo n.º 12
0
	def add(self):
		newServer = ConfigSubsection()
		config.plugins.ftpbrowser.server.append(newServer)
		newServer.name = ConfigText("Name", fixed_size = False)
		newServer.address = ConfigText("192.168.2.12", fixed_size = False)
		newServer.username = ConfigText("root", fixed_size = False)
		newServer.password = ConfigPassword("dreambox")
		newServer.port = ConfigInteger(21, (1, 65535))
		newServer.passive = ConfigYesNo(False)
		newServer.connectiontype = ConfigYesNo(False)
		config.plugins.ftpbrowser.servercount.value += 1
		config.plugins.ftpbrowser.servercount.save()

		self.updateServerList()
		self.changed = True
Exemplo n.º 13
0
	def __init__(self):
		self.titles = [ ]
		self.target = None
		self.settings = ConfigSubsection()
		self.settings.name = ConfigText(fixed_size = False, visible_width = 40)
		self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("Dreambox format data DVD (HDTV compatible)"))])
		self.settings.titlesetmode = ConfigSelection(choices = [("single", _("Simple titleset (compatibility for legacy players)")), ("multi", _("Complex (allows mixing audio tracks and aspects)"))], default="multi")
		self.settings.output = ConfigSelection(choices = [("iso", _("Create DVD-ISO")), ("dvd", _("Burn DVD"))])
		self.settings.isopath = ConfigText(fixed_size = False, visible_width = 40)
		self.settings.dataformat = ConfigSelection(choices = [("iso9660_1", ("ISO9660 Level 1")), ("iso9660_4", ("ISO9660 version 2")), ("udf", ("UDF"))])
		self.settings.menutemplate = ConfigFilename()
		self.settings.vmgm = ConfigFilename()
		self.filekeys = ["vmgm", "isopath", "menutemplate"]
		self.menutemplate = MenuTemplate()
Exemplo n.º 14
0
	def saveconfig(self):
		nim_config_list = []
		if self.initial_state != config.clientmode.enabled.value and self.initial_state == False:  # switching to client mode
			# save normal mode config so it can be reinsated when returning to normal mode
			nim_config_list = []
			for x in config.Nims:
				nim_config_list.append(x.getSavedValue())
			import json
			config.clientmode.nim_cache.value = json.dumps(nim_config_list)
			config.clientmode.remote_fallback_enabled_cache.value = config.usage.remote_fallback_enabled.value
			config.clientmode.remote_fallback_cache.value = config.usage.remote_fallback.value
			# normal mode config values saved
		if config.clientmode.enabled.value:
			config.usage.remote_fallback_enabled.value = True
			config.usage.remote_fallback.value = "http://%s:%d" % (self.getRemoteAddress(), config.clientmode.serverStreamingPort.value)
		elif self.initial_state != config.clientmode.enabled.value: # switching back to normal mode
			# load nim config from config.clientmode.nimcache
			import json
			nim_config_list = json.loads(config.clientmode.nim_cache.value)
			config.clientmode.nim_cache.value = ""
			config.Nims = ConfigSubList()
			for x in nim_config_list:
				tuner = ConfigSubsection()
				tuner.setSavedValue(x)
				config.Nims.append(tuner)
			config.Nims.save()
			# nim config loaded... but needs restart
			# reinstate normal mode values
			config.usage.remote_fallback_enabled.value = config.clientmode.remote_fallback_enabled_cache.value
			config.usage.remote_fallback.value = config.clientmode.remote_fallback_cache.value
			# reset some client mode settings
			config.clientmode.remote_fallback_enabled_cache.value = False
			config.clientmode.remote_fallback_cache.value = ""
		config.usage.save()
		config.clientmode.save()
		configfile.save()
Exemplo n.º 15
0
def InitVcsProfile(profile=None, name=""):
	if profile is None:
		profile = ConfigSubsection()
	profile.name = ConfigText("", fixed_size=False)
	if not profile.name.value and name:
		profile.name.value = name
		profile.name.save()
	profile.enabled = ConfigYesNo(default=True)
	profile.stretch = ConfigSelection([("0",_("no")), ("1", _("yes"))], default="0")
	profile.aspect = ConfigInteger(2)
	profile.cliprect = ConfigPosition([0,0,720,576], (719,575,720,576))
	return profile
Exemplo n.º 16
0
from Components.config import getConfigListEntry, configfile, ConfigSelection, ConfigSubsection, ConfigText, ConfigLocations
from Components.config import config
from Components.ConfigList import ConfigList, ConfigListScreen
from Components.FileList import MultiFileSelectList
from Components.Network import iNetwork
from Plugins.Plugin import PluginDescriptor
from enigma import eTimer, eEnv, eConsoleAppContainer, eEPGCache
from Tools.Directories import *
from os import system, popen, path, makedirs, listdir, access, stat, rename, remove, W_OK, R_OK
from time import gmtime, strftime, localtime, sleep
from datetime import date
from boxbranding import getBoxType, getMachineBrand, getMachineName

boxtype = getBoxType()

config.plugins.configurationbackup = ConfigSubsection()
if boxtype in ('maram9', 'classm', 'axodin', 'axodinc', 'starsatlx', 'genius',
               'evo', 'galaxym6') and not path.exists(
                   "/media/hdd/backup_%s" % boxtype):
    config.plugins.configurationbackup.backuplocation = ConfigText(
        default='/media/backup/', visible_width=50, fixed_size=False)
else:
    config.plugins.configurationbackup.backuplocation = ConfigText(
        default='/media/hdd/', visible_width=50, fixed_size=False)
config.plugins.configurationbackup.backupdirs = ConfigLocations(default=[
    eEnv.resolve('${sysconfdir}/enigma2/'), '/etc/CCcam.cfg', '/usr/keys/',
    '/etc/network/interfaces', '/etc/wpa_supplicant.conf',
    '/etc/wpa_supplicant.ath0.conf', '/etc/wpa_supplicant.wlan0.conf',
    '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname',
    eEnv.resolve("${datadir}/enigma2/keymap.usr")
])
Exemplo n.º 17
0
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.ConfigList import ConfigListScreen
from Components.config import config, getConfigListEntry, ConfigSubsection, ConfigInteger, ConfigYesNo, ConfigText, ConfigSelection, ConfigSubList, ConfigIP
from Components.Sources.StaticText import StaticText
from Components.MenuList import MenuList
from Components.MultiContent import MultiContentEntryText
from Components.ActionMap import ActionMap

config.plugins.vTuner = ConfigSubsection()
config.plugins.vTuner.client = ConfigSubsection()
config.plugins.vTuner.client.enabled = ConfigYesNo(default=True)
config.plugins.vTuner.client.mode = ConfigSubList()
   
for i in [0,1,2]:
    mode = ConfigSubsection()
    if i == 0:
        # first type must not be none
        mode.type = ConfigSelection(default="-s2", choices = [("-s2", _("DVB-S2 connected to DVB-S/S2")),("-c", _("DVB-C")),("-t", _("DVB-T")), ("-S2", _("DVB-S/S2 connected to DVB-S2")), ("-s", _("DVB-S connected to DVB-S/S2")), ("-S", _("DVB-S connected to DVB-S")) ])
    else:
        mode.type = ConfigSelection(default="", choices = [("", _("unused")), ("-s2", _("DVB-S2 connected to DVB-S/S2")),("-c", _("DVB-C")),("-t", _("DVB-T")), ("-S2", _("DVB-S2 connected to DVB-S2")), ("-s", _("DVB-S connected to DVB-S/S2")), ("-S", _("DVB-S connected to DVB-S")) ])
    mode.discover = ConfigYesNo(default=True)
    mode.ip = ConfigText( default="0.0.0.0" )
    mode.port = ConfigInteger(default = 39305, limits=(0, 49152) )
    mode.group = ConfigInteger(default = 1, limits=(1, 255) )
    config.plugins.vTuner.client.mode.append(mode) 
    
def configCB(result, session):
    if result is True:
        f = open('/etc/vtunerc.conf','w')
        f.write("# this file is auto generated and will be overwritten\n")
Exemplo n.º 18
0
config.plugins.KiddyTimer = ConfigSubsection()
config.plugins.KiddyTimer.enabled = ConfigYesNo(default=False)
config.plugins.KiddyTimer.position_x = ConfigInteger(default=590)
config.plugins.KiddyTimer.position_y = ConfigInteger(default=35)
config.plugins.KiddyTimer.timerStyle = ConfigSelection(choices = [("clock", _("Clock")), ("smiley", _("Smiley")), ("noimage", _("no Image"))])
config.plugins.KiddyTimer.lastStartDay = ConfigText(default="")
config.plugins.KiddyTimer.lastStatus = ConfigText(default="") # Used for cheat detection
config.plugins.KiddyTimer.monitorStartTime = ConfigClock(default=KTglob.FOUROCLOCK)
config.plugins.KiddyTimer.monitorEndTime = ConfigClock(default=KTglob.EIGHTOCLOCKNOON)
config.plugins.KiddyTimer.activationDialogTimeout = ConfigInteger(default=10)
config.plugins.KiddyTimer.pin = ConfigPIN(default = 1111 , censor = "*")
config.plugins.KiddyTimer.remainingTime = ConfigInteger(default=int(KTglob.ONEHOUR), limits = (0,86400) )

config.plugins.KiddyTimer.dayTimes = ConfigSubList()
for i in range(0, 7):
    s = ConfigSubsection()
    s.timeValue = ConfigClock(default=KTglob.ONEOCLOCK)
    config.plugins.KiddyTimer.dayTimes.append(s)
    del s

def setup(session, **kwargs):
    session.open(KiddyTimerSetup)

def sessionstart(reason, **kwargs):
    if reason == 0:
        kiddyTimer.gotSession(kwargs["session"])

def autostart(reason, **kwargs):
    if reason == 1:
        global kiddyTimer
        kiddyTimer.stopTimer()
Exemplo n.º 19
0
#

# for localized messages  	 
from . import _

# Config
from Components.config import config, ConfigInteger, ConfigSubList, \
		ConfigSubsection, ConfigText, ConfigPassword, ConfigYesNo

config.plugins.ftpbrowser = ConfigSubsection()
config.plugins.ftpbrowser.server = ConfigSubList()
config.plugins.ftpbrowser.servercount = ConfigInteger(0)
i = 0
append = config.plugins.ftpbrowser.server.append
while i < config.plugins.ftpbrowser.servercount.value:
	newServer = ConfigSubsection()
	append(newServer)
	newServer.name = ConfigText("Name", fixed_size=False)
	newServer.address = ConfigText("192.168.2.12", fixed_size=False)
	newServer.username = ConfigText("root", fixed_size=False)
	newServer.password = ConfigPassword("dreambox")
	newServer.port = ConfigInteger(21, (1, 65535))
	newServer.passive = ConfigYesNo(False)
	newServer.connectiontype = ConfigYesNo(False)
	i += 1
	del newServer

del append, i

from FTPBrowser import FTPBrowser
from FTPServerManager import ftpserverFromURI
Exemplo n.º 20
0
from Components.config import config, getConfigListEntry, ConfigSubsection, ConfigInteger, ConfigYesNo, ConfigText, ConfigSelection, ConfigSubList, ConfigIP
from Components.Sources.StaticText import StaticText
from Components.MenuList import MenuList
from Components.MultiContent import MultiContentEntryText
from Components.ActionMap import ActionMap

config.plugins.vTuner = ConfigSubsection()
config.plugins.vTuner.client = ConfigSubsection()
config.plugins.vTuner.client.enabled = ConfigYesNo(default=True)
config.plugins.vTuner.client.mode = ConfigSubList()
config.plugins.vTuner.client.discover = ConfigYesNo(default=True)
config.plugins.vTuner.client.ip = ConfigIP( default=[0,0,0,0] )
config.plugins.vTuner.client.port = ConfigInteger(default = 39305, limits=(0, 49152) )
   
for i in [0,1,2]:
    mode = ConfigSubsection()
    if i == 0:
        # first type must not be none
        mode.type = ConfigSelection(default="s2", choices = [("s2", _("DVB-S2 connected to DVB-S/S2")),("c", _("DVB-C")),("t", _("DVB-T")), ("S2", _("DVB-S/S2 connected to DVB-S2")), ("s", _("DVB-S connected to DVB-S/S2")), ("S", _("DVB-S connected to DVB-S")) ])
    else:
        mode.type = ConfigSelection(default="", choices = [("", _("unused")), ("s2", _("DVB-S2 connected to DVB-S/S2")),("c", _("DVB-C")),("t", _("DVB-T")), ("S2", _("DVB-S2 connected to DVB-S2")), ("s", _("DVB-S connected to DVB-S/S2")), ("S", _("DVB-S connected to DVB-S")) ])
    mode.group = ConfigInteger(default = 1, limits=(1, 255) )
    config.plugins.vTuner.client.mode.append(mode)
    
config.plugins.vTuner.server = ConfigSubsection()
config.plugins.vTuner.server.enabled = ConfigYesNo(default=False) 

config.plugins.vTuner.expert = ConfigSubsection()
config.plugins.vTuner.expert.enabled = ConfigYesNo(default=False)
config.plugins.vTuner.expert.buffersize = ConfigInteger(default = 696, limits=(200, 2000) )
config.plugins.vTuner.expert.readdelay = ConfigInteger(default = 50, limits=(0, 300) )
Exemplo n.º 21
0
# OWN IMPORTS
from EpgCenterList import MULTI_EPG_NOW, MULTI_EPG_NEXT, SINGLE_EPG, MULTI_EPG_PRIMETIME, TIMERLIST, EPGSEARCH_HISTORY
from MerlinEPGCenter import STYLE_SINGLE_LINE, STYLE_SHORT_DESCRIPTION, TAB_TEXT_EPGLIST
from SkinFinder import SkinFinder

TAB_CHOICES = [
    ("-1", _("disabled")),
    (str(MULTI_EPG_NOW), TAB_TEXT_EPGLIST[MULTI_EPG_NOW]),
    (str(MULTI_EPG_NEXT), TAB_TEXT_EPGLIST[MULTI_EPG_NEXT]),
    (str(SINGLE_EPG), TAB_TEXT_EPGLIST[SINGLE_EPG]),
    (str(MULTI_EPG_PRIMETIME), TAB_TEXT_EPGLIST[MULTI_EPG_PRIMETIME]),
    (str(TIMERLIST), TAB_TEXT_EPGLIST[TIMERLIST]),
    (str(EPGSEARCH_HISTORY), TAB_TEXT_EPGLIST[EPGSEARCH_HISTORY]),
]

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.serviceNameWidth = ConfigSelectionNumber(
    min=-10, max=20, stepwidth=1, default=0)
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.replaceInfobarChannelUp = ConfigSelection(
    default="-1", choices=TAB_CHOICES)
config.plugins.merlinEpgCenter.replaceInfobarChannelDown = ConfigSelection(
Exemplo n.º 22
0
import timer
import time
import math

from Tools import Notifications

from Components.config import config, ConfigYesNo, ConfigSelection, ConfigSubsection

from Screens.MessageBox import MessageBox
import Screens.Standby

config.SleepTimer = ConfigSubsection()
config.SleepTimer.ask = ConfigYesNo(default=True)
config.SleepTimer.action = ConfigSelection(default="shutdown",
                                           choices=[("shutdown",
                                                     _("shutdown")),
                                                    ("standby", _("standby"))])


class SleepTimerEntry(timer.TimerEntry):
    def __init__(self, begin):
        timer.TimerEntry.__init__(self, int(begin), int(begin))

        self.prepare_time = 0

    def getNextActivation(self):
        return self.begin

    def activate(self):
        if self.state == self.StateRunning:
            if config.SleepTimer.action.value == "shutdown":
Exemplo n.º 23
0
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of the GNU General Public License
#    as published by the Free Software Foundation; either version 2
#    of the License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#################################################################################

from Plugins.Plugin import PluginDescriptor
from Components.config import config, ConfigSubsection, ConfigYesNo

config.plugins.ModifyPLiFullHD = ConfigSubsection()
config.plugins.ModifyPLiFullHD.enabled = ConfigYesNo(default=False)


def autostart(reason, **kwargs):
    import ui
    if reason == 0 and config.plugins.ModifyPLiFullHD.enabled.value and config.skin.primary_skin.value.split(
            '/')[0] in ("PLi-FullHD", "PLi-FullNightHD",
                        "PLi-HD1") and ui.reload_skin_on_start:
        ui.modifyskin.applyAutorun()


def main(session, **kwargs):
    import ui

    def recursive(answer=False):
Exemplo n.º 24
0
usable = False
preferedmodes = None
default = None
port = None
videoresolution_dictionary = {}
resolutionlabel = None

resolutions = (('sd_i_50', (_("SD 25/50HZ Interlace Mode"))), ('sd_i_60', (_("SD 30/60HZ Interlace Mode"))), \
   ('sd_p_50', (_("SD 25/50HZ Progressive Mode"))), ('sd_p_60', (_("SD 30/60HZ Progressive Mode"))), \
   ('hd_i', (_("HD Interlace Mode"))), ('hd_p', (_("HD Progressive Mode"))), \
   ('p720_24', (_("Enable 720p24 Mode"))), ('p1080_24', (_("Enable 1080p24 Mode"))), \
   ('p1080_25', (_("Enable 1080p25 Mode"))), ('p1080_30', (_("Enable 1080p30 Mode"))), \
   ('uhd_p', (_("UHD Progressive Mode"))), ('p2160_24', (_("Enable 2160p24 Mode"))), \
   ('p2160_25', (_("Enable 2160p25 Mode"))), ('p2160_30', (_("Enable 2160p30 Mode"))))

config.plugins.autoresolution = ConfigSubsection()
config.plugins.autoresolution.enable = ConfigYesNo(default=False)
config.plugins.autoresolution.showinfo = ConfigYesNo(default=True)
config.plugins.autoresolution.testmode = ConfigYesNo(default=False)
config.plugins.autoresolution.deinterlacer = ConfigSelection(
    default="auto",
    choices=[("off", _("off")), ("auto", _("auto")), ("on", _("on")),
             ("bob", _("bob"))])
config.plugins.autoresolution.deinterlacer_progressive = ConfigSelection(
    default="auto",
    choices=[("off", _("off")), ("auto", _("auto")), ("on", _("on")),
             ("bob", _("bob"))])
config.plugins.autoresolution.delay_switch_mode = ConfigSelection(
    default="1000",
    choices=[("50", "0.05 " + _("seconds")), ("500", "0.5 " + _("seconds")),
             ("1000", "1 " + _("second")), ("2000", "2 " + _("seconds")),
Exemplo n.º 25
0
from Plugins.Plugin import PluginDescriptor
from os import stat
from Vps import vps_timers
from Vps_setup import VPS_Setup
from Modifications import register_vps
from . import _
from boxbranding import getImageDistro

# Config
from Components.config import config, ConfigYesNo, ConfigSubsection, ConfigInteger, ConfigSelection

config.plugins.vps = ConfigSubsection()
config.plugins.vps.enabled = ConfigYesNo(default=True)
config.plugins.vps.do_PDC_check = ConfigYesNo(default=True)
config.plugins.vps.initial_time = ConfigInteger(default=10, limits=(0, 120))
config.plugins.vps.allow_wakeup = ConfigYesNo(default=False)
config.plugins.vps.allow_seeking_multiple_pdc = ConfigYesNo(default=True)
config.plugins.vps.vps_default = ConfigSelection(choices=[("no", _("No")), ("yes_safe", _("Yes (safe mode)")), ("yes", _("Yes"))], default="no")
config.plugins.vps.instanttimer = ConfigSelection(choices=[("no", _("No")), ("yes_safe", _("Yes (safe mode)")), ("yes", _("Yes")), ("ask", _("always ask"))], default="ask")
config.plugins.vps.infotext = ConfigInteger(default=0)

# 04 Feb 2021.  If we don't force-save this then
#   config.plugins.vps.enabled=False
# hangs around in the settings file even after you set it back to True.
# Something else seems to be wrong somewhere, but this is a quick and
# imple fix/workaround.
#
config.plugins.vps.enabled.save_forced = True


def autostart(reason, **kwargs):
Exemplo n.º 26
0
        "gopframep": "gop_framep",
        "level": "level",
        "profile": "profile",
        "width": "width",
        "height": "height",
    }.get(configName)
    return "/proc/stb/encoder/%s/%s" % (encoder, _configName)


def checkSupportAdvanced():
    if fileExists(getProcPath(0, "aspectratio")):
        return True
    return False


config.plugins.transcodingsetup = ConfigSubsection()
config.plugins.transcodingsetup.transcoding = ConfigSelection(
    default="enable",
    choices=[("enable", _("enable")), ("disable", _("disable"))])
config.plugins.transcodingsetup.port = ConfigInteger(default=8002,
                                                     limits=(8002, 9999))
config.plugins.transcodingsetup.encoder = ConfigSubList()


def createTransCodingConfig(encoder):
    if fileExists(getProcPath(encoder, "bitrate")):
        if getBoxType() in ('vusolo2') or getMachineBuild() in ('dags3',
                                                                'dags4'):
            choice = ConfigSelection(default="400000",
                                     choices=[("-1", "Auto"),
                                              ("50000", "50 Kbits"),
Exemplo n.º 27
0
from Screens.SkinSelector import SkinSelector
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
import Tools.Notifications
from os import listdir, remove, rename, system, path, symlink, chdir, makedirs, mkdir
import shutil

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

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


def Plugins(**kwargs):
    return [
        PluginDescriptor(name=_("%s Setup") % cur_skin,
                         description=_("Personalize your Skin"),
                         where=PluginDescriptor.WHERE_MENU,
                         icon="plugin.png",
Exemplo n.º 28
0
from Components.Pixmap import Pixmap, MovingPixmap
from Components.ActionMap import HelpableActionMap, ActionMap
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 ConfigListScreen
from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSelection, ConfigText, ConfigOnOff, getConfigListEntry

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="#00000000", choices = [("#00000000", _("black")),("#009eb9ff", _("blue")),("#00ff5a51", _("red")), ("#00ffe875", _("yellow")), ("#0038FF48", _("green"))])
config.pic.textcolor = ConfigSelection(default="#0038FF48", choices = [("#00000000", _("black")),("#009eb9ff", _("blue")),("#00ff5a51", _("red")), ("#00ffe875", _("yellow")), ("#0038FF48", _("green"))])
config.pic.thumbDelay = ConfigInteger(default=500, limits=(0,999))

def setPixmap(dest, ptr, scaleSize, aspectRatio):
	if scaleSize.isValid() and aspectRatio.isValid():
		pic_scale_size = ptr.size().scale(scaleSize, aspectRatio)
Exemplo n.º 29
0
    else:
        stbid = ""
    if stbid and os.path.exists(lircfile + "." + stbid):
        lircfile += "." + stbid
    for line in open(lircfile, "r").readlines():
        if "KEY_" in line:
            key = line.split("KEY_",
                             1)[1].replace("0x", " ").split(" ", 1)[0].replace(
                                 "\t", "").lower()
            if key not in usedkeys:
                usedkeys.append(key)
    keys = [key for key in keys if key[1].split("_")[0] in usedkeys]
    return keys


config.misc.hotkey = ConfigSubsection()
config.misc.hotkey.additional_keys = ConfigYesNo(default=False)
for x in getHotkeys():
    exec "config.misc.hotkey." + x[1] + " = ConfigText(default='" + x[2] + "')"


def getHotkeyFunctions():
    hotkeyFunctions = []
    twinPlugins = []
    twinPaths = {}
    pluginlist = plugins.getPlugins(PluginDescriptor.WHERE_EVENTINFO)
    pluginlist.sort(key=lambda p: p.name)
    for plugin in pluginlist:
        if plugin.name not in twinPlugins and plugin.path and 'selectedevent' not in plugin.__call__.func_code.co_varnames:
            if twinPaths.has_key(plugin.path[24:]):
                twinPaths[plugin.path[24:]] += 1
Exemplo n.º 30
0
simpleRSS.update_notification = ConfigSelection(
	choices = [
		("notification", _("Notification")),
		("preview", _("Preview")),
		("none", _("none"))
	],
	default = "preview"
)
simpleRSS.interval = ConfigNumber(default=15)
simpleRSS.feedcount = ConfigNumber(default=0)
simpleRSS.autostart = ConfigEnableDisable(default=False)
simpleRSS.keep_running = ConfigEnableDisable(default=True)
simpleRSS.feed = ConfigSubList()
i = 0
while i < simpleRSS.feedcount.value:
	s = ConfigSubsection()
	s.uri = ConfigText(default="http://", fixed_size=False)
	s.autoupdate = ConfigEnableDisable(default=True)
	simpleRSS.feed.append(s)
	i += 1
	del s
simpleRSS.enable_google_reader = ConfigYesNo(default=False)
simpleRSS.google_username = ConfigText(default="", fixed_size=False)
simpleRSS.google_password = ConfigPassword(default="")

del simpleRSS, i

# Global Poller-Object
rssPoller = None

# Main Function
Exemplo n.º 31
0
from Plugins.Plugin import PluginDescriptor
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
from Screens.Console import Console
from Screens.Standby import TryQuitMainloop
from Components.ActionMap import ActionMap
from Components.config import config, ConfigYesNo, ConfigSubsection, getConfigListEntry, ConfigSelection, ConfigText, ConfigInteger
from Components.ConfigList import ConfigListScreen
from Components.Label import Label
from Tools.Directories import fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_LIBDIR
from skin import parseColor
from os import system

config.plugins.valiXDsetup = ConfigSubsection()
config.plugins.valiXDsetup.ShowPicons = ConfigYesNo(default=False)
config.plugins.valiXDsetup.CenterMenus = ConfigYesNo(default=False)
config.plugins.valiXDsetup.Style = ConfigSelection(
    default="base",
    choices=[("base", _("Base")), ("beyonddreams", _("Beyond Dreams")),
             ("validator", _("Validator")), ("shadow", _("Magic Shadow")),
             ("shadow2", _("New Shadow")), ("glas", _("Glas")),
             ("metalpad", _("Metal Pad")), ("vision", _("New Vision")),
             ("atlantis", _("Atlantis")), ("avalon", _("Avalon")),
             ("blues", _("Blues of dream"))])
config.plugins.valiXDsetup.ChannSelector = ConfigSelection(
    default="simple",
    choices=[("simple", _("Simple")), ("full", _("Full")),
             ("full-vert", _("Full-vertical")),
             ("full-hor", _("Full-horizontal")), ("pig", _("with PiG"))])
Exemplo n.º 32
0
from Components.ProgressBar import ProgressBar
from Components.config import getConfigListEntry, configfile, ConfigSelection, ConfigSubsection, ConfigText, ConfigLocations
from Components.config import config
from Components.ConfigList import ConfigList, ConfigListScreen
from Components.FileList import MultiFileSelectList
from Components.Console import Console as ComConsole
from Plugins.Plugin import PluginDescriptor
from enigma import eTimer, getDesktop, eConsoleAppContainer, getVTiVersionString
from Tools.Directories import *
from Tools.HardwareInfoVu import HardwareInfoVu
from os import popen, path, makedirs, listdir, access, stat, rename, remove, W_OK, R_OK, chmod, remove
from time import gmtime, strftime, localtime, time as systime, sleep
from datetime import date, datetime
from shutil import rmtree
from __init__ import _
config.plugins.vtipanel = ConfigSubsection()
config.plugins.vtipanel.configurationbackup = ConfigSubsection()
config.plugins.vtipanel.configurationbackup.backuplocation = ConfigText(
    default='/media/hdd/', visible_width=50, fixed_size=False)
config.plugins.vtipanel.configurationbackup.backuplocationimage = ConfigText(
    default='/media/hdd/', visible_width=50, fixed_size=False)


def getBackupPath():
    backuppath = config.plugins.vtipanel.configurationbackup.backuplocation.value
    if backuppath.endswith('/'):
        return backuppath + 'vtibackup'
    else:
        return backuppath + '/vtibackup'

Exemplo n.º 33
0
from Plugins.Plugin import PluginDescriptor
from Tools.Directories import resolveFilename, SCOPE_GUISKIN
from Tools.LoadPixmap import LoadPixmap
from Plugins.SystemPlugins.WirelessLan.Wlan import iWlan, iStatus, getWlanConfigName, existBcmWifi
from time import time
import re
from Components.SystemInfo import BoxInfo

plugin_path = eEnv.resolve(
    "${libdir}/enigma2/python/Plugins/SystemPlugins/WirelessLan")

list = ["Unencrypted", "WEP", "WPA", "WPA/WPA2", "WPA2"]

weplist = ["ASCII", "HEX"]

config.plugins.wlan = ConfigSubsection()
config.plugins.wlan.essid = NoSave(ConfigText(default="", fixed_size=False))
config.plugins.wlan.hiddenessid = NoSave(ConfigYesNo(default=False))
config.plugins.wlan.encryption = NoSave(ConfigSelection(list, default="WPA2"))
config.plugins.wlan.wepkeytype = NoSave(
    ConfigSelection(weplist, default="ASCII"))
config.plugins.wlan.psk = NoSave(ConfigPassword(default="", fixed_size=False))


class WlanStatus(Screen):
    skin = """
		<screen name="WlanStatus" position="center,center" size="560,400" title="Wireless network status" >
			<ePixmap pixmap="buttons/red.png" position="0,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="LabelBSSID" render="Label" position="10,60" size="200,25" valign="left" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" />
Exemplo n.º 34
0
class DVDProject:
	def __init__(self):
		self.titles = [ ]
		self.target = None
		self.settings = ConfigSubsection()
		self.settings.name = ConfigText(fixed_size = False, visible_width = 40)
		self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("Dreambox format data DVD (HDTV compatible)"))])
		self.settings.titlesetmode = ConfigSelection(choices = [("single", _("Simple titleset (compatibility for legacy players)")), ("multi", _("Complex (allows mixing audio tracks and aspects)"))], default="multi")
		self.settings.output = ConfigSelection(choices = [("iso", _("Create DVD-ISO")), ("dvd", _("Burn DVD"))])
		self.settings.isopath = ConfigText(fixed_size = False, visible_width = 40)
		self.settings.dataformat = ConfigSelection(choices = [("iso9660_1", ("ISO9660 Level 1")), ("iso9660_4", ("ISO9660 version 2")), ("udf", ("UDF"))])
		self.settings.menutemplate = ConfigFilename()
		self.settings.vmgm = ConfigFilename()
		self.filekeys = ["vmgm", "isopath", "menutemplate"]
		self.menutemplate = MenuTemplate()

	def addService(self, service):
		import DVDTitle
		title = DVDTitle.DVDTitle()
		title.addService(service)
		self.titles.append(title)
		return title

	def saveProject(self, path):
		from Tools.XMLTools import stringToXML
		list = []
		list.append('<?xml version="1.0" encoding="utf-8" ?>\n')
		list.append('<DreamDVDBurnerProject>\n')
		list.append('\t<settings ')
		for key, val in self.settings.dict().iteritems():
			list.append( key + '="' + str(val.getValue()) + '" ' )
		list.append('/>\n')
		list.append('\t<titles>\n')
		for title in self.titles:
			list.append('\t\t<title>\n')
			list.append('\t\t\t<path>')
			list.append(stringToXML(title.source.getPath()))
			list.append('</path>\n')
			list.append('\t\t\t<properties ')
			audiotracks = []
			for key, val in title.properties.dict().iteritems():
				if type(val) is ConfigSubList:
					audiotracks.append('\t\t\t<audiotracks>\n')
					for audiotrack in val:
						audiotracks.append('\t\t\t\t<audiotrack ')
						for subkey, subval in audiotrack.dict().iteritems():
							audiotracks.append( subkey + '="' + str(subval.getValue()) + '" ' )
						audiotracks.append(' />\n')
					audiotracks.append('\t\t\t</audiotracks>\n')
				else:
					list.append( key + '="' + str(val.getValue()) + '" ' )
			list.append('/>\n')
			for line in audiotracks:
				list.append(line)
			list.append('\t\t</title>\n')
		list.append('\t</titles>\n')
		list.append('</DreamDVDBurnerProject>\n')

		name = self.settings.name.getValue()
		i = 0
		filename = path + name + ".ddvdp.xml"
		while fileExists(filename):
			i = i+1
			filename = path + name + str(i).zfill(3) + ".ddvdp.xml"
		try:	
			file = open(filename, "w")
			for x in list:
				file.write(x)
			file.close()
		except:
			return False
		return filename

	def load(self, filename):
		ret = self.loadProject(filename)
		if ret:
			ret = self.menutemplate.loadTemplate(self.settings.menutemplate.getValue())
			self.error += self.menutemplate.error
		return ret

	def loadProject(self, filename):
		import xml.dom.minidom
		try:
			if not fileExists(filename):
				self.error = "xml file not found!"
				raise AttributeError
			else:
				self.error = ""
			file = open(filename, "r")
			data = file.read().decode("utf-8").replace('&',"&amp;").encode("ascii",'xmlcharrefreplace')
			file.close()
			projectfiledom = xml.dom.minidom.parseString(data)
			for project in projectfiledom.childNodes[0].childNodes:
			  if project.nodeType == xml.dom.minidom.Element.nodeType:
			    if project.tagName == 'settings':
				i = 0
				if project.attributes.length < len(self.settings.dict())-1:
					self.error = "project attributes missing"
					raise AttributeError
				while i < project.attributes.length:
					item = project.attributes.item(i)
					key = item.name.encode("utf-8")
					try:
						val = eval(item.nodeValue)
					except (NameError, SyntaxError):
						val = item.nodeValue.encode("utf-8")
					try:
						self.settings.dict()[key].setValue(val)
					except (KeyError):
						self.error = "unknown attribute '%s'" % (key)
						raise AttributeError
					i += 1
			for key in self.filekeys:
				val = self.settings.dict()[key].getValue()
				if not fileExists(val):
					self.error += "\n%s '%s' not found" % (key, val)
			if len(self.error):
				raise AttributeError
		except AttributeError:
			self.error += (" in project '%s'") % (filename)
			return False
		return True
Exemplo n.º 35
0
# -*- coding: utf-8 -*-
from __future__ import print_function

from . import _
# Plugin definition
from Plugins.Plugin import PluginDescriptor

from Components.PluginComponent import PluginComponent
from Components.config import config, ConfigSubsection, ConfigSet

from PluginHiderSetup import PluginHiderSetup

from operator import attrgetter


config.plugins.pluginhider = ConfigSubsection()
config.plugins.pluginhider.hideextensions = ConfigSet(choices=[])
config.plugins.pluginhider.hideplugins = ConfigSet(choices=[])
config.plugins.pluginhider.hideeventinfo = ConfigSet(choices=[])

hasPluginWeight = True

def hidePlugin(plugin):
	"""Convenience function for external code to hide a plugin."""
	hide = config.plugins.pluginhider.hideplugins.value
	if not plugin.name in hide:
		hide.append(plugin.name)
		config.plugins.pluginhider.hideplugins.save()

def PluginComponent_getPlugins(self, where):
	if not isinstance(where, list):
Exemplo n.º 36
0
		("ticker", _("Ticker")),
		("none", _("none"))
	],
	default = "preview"
)
simpleRSS.ticker_speed = ConfigInteger(default = 125, limits = (100, 900))
simpleRSS.interval = ConfigNumber(default=15)
simpleRSS.feedcount = ConfigNumber(default=0)
simpleRSS.autostart = ConfigYesNo(default=False)
simpleRSS.keep_running = ConfigYesNo(default=True)
simpleRSS.ext_menu = ConfigYesNo(default=True)
simpleRSS.filescan = ConfigNothing()
simpleRSS.feed = ConfigSubList()
i = 0
while i < simpleRSS.feedcount.value:
	s = ConfigSubsection()
	s.uri = ConfigText(default="http://", fixed_size=False)
	s.autoupdate =  ConfigYesNo(default=True)
	simpleRSS.feed.append(s)
	i += 1
	del s
simpleRSS.enable_google_reader = ConfigYesNo(default=False)
simpleRSS.google_username = ConfigText(default="", fixed_size=False)
simpleRSS.google_password = ConfigPassword(default="")

del simpleRSS, i

# Global Poller-Object
rssPoller = None

# Main Function
Exemplo n.º 37
0
			return None
		return name
	return None

# we do our best to always select the "right" value
# skins are loaded in order of priority: skin with
# highest priority is loaded last, usually the user-provided
# 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 = "BlackShadowSE_P/skin.xml"
if not fileExists(resolveFilename(SCOPE_SKIN, DEFAULT_SKIN)):
	# in that case, fallback to Magic (which is an SD skin)
	DEFAULT_SKIN = "skin.xml"
config.skin.primary_skin = ConfigText(default=DEFAULT_SKIN)

DEFAULT_DISPLAY_SKIN = "skin_display.xml"
config.skin.display_skin = ConfigText(default=DEFAULT_DISPLAY_SKIN)

profile("LoadSkin")
res = None
name = skin_user_skinname()
if name:
	res = addSkin(name, SCOPE_CONFIG)
if not name or not res:
Exemplo n.º 38
0
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.config import config, ConfigSelection, ConfigYesNo, getConfigListEntry, ConfigSubsection, ConfigText
from Components.ConfigList import ConfigListScreen
from Components.NimManager import nimmanager
from Components.Label import Label
from Components.Pixmap import Pixmap
from Components.ProgressBar import ProgressBar
from Components.ServiceList import refreshServiceList
from Components.ActionMap import ActionMap

from enigma import eFastScan, eDVBFrontendParametersSatellite, eTimer

import os

config.misc.fastscan = ConfigSubsection()
config.misc.fastscan.last_configuration = ConfigText(default="()")
config.misc.fastscan.auto = ConfigYesNo(default=True)


class FastScanStatus(Screen):
    skin = """
	<screen position="150,115" size="420,180" title="Fast Scan">
		<widget name="frontend" pixmap="skin_default/icons/scan-s.png" position="5,5" size="64,64" transparent="1" alphatest="on" />
		<widget name="scan_state" position="10,120" zPosition="2" size="400,30" font="Regular;18" />
		<widget name="scan_progress" position="10,155" size="400,15" pixmap="skin_default/progress_big.png" borderWidth="2" borderColor="#cccccc" />
	</screen>"""

    def __init__(self,
                 session,
                 scanTuner=0,
Exemplo n.º 39
0
# for localized messages
from . import _, PluginLanguageDomain

from Screens.Screen import Screen
from Screens.Console import Console
from Screens.Setup import Setup
from Components.ActionMap import ActionMap
from Components.Sources.StaticText import StaticText
from Components.config import config, ConfigSubsection, ConfigYesNo
from IPKInstaller import IpkgInstaller
from Components.PluginComponent import plugins
from Tools.Directories import resolveFilename, SCOPE_PLUGINS
from os import path, mkdir, listdir

config.scriptrunner = ConfigSubsection()
config.scriptrunner.close = ConfigYesNo(default=False)
config.scriptrunner.showinextensions = ConfigYesNo(default=False)

def updateExtensions(configElement):
	plugins.clearPluginList()
	plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
config.scriptrunner.showinextensions.addNotifier(updateExtensions, initial_call=False)


def ScriptRunnerAutostart(reason, session=None, **kwargs):
	pass

class VIXScriptRunner(IpkgInstaller):
	def __init__(self, session, list=None, menu_path=""):
		if not list:
			list = []
Exemplo n.º 40
0
	def new(self):
		newServerConfigSubsection = ConfigSubsection()
		config.plugins.vlcplayer.servers.append(newServerConfigSubsection)
		newServerConfigSubsection.name = ConfigText("Server " + str(self.__getServerCount()), False)
		if newServerConfigSubsection.name.value == newServerConfigSubsection.name.default:
			newServerConfigSubsection.name.default = ""
		newServerConfigSubsection.addressType = ConfigSelectionExtended(
				[("FQDN", _("FQDN")),
				 ("IP", _("IP-Address"))
				], "IP")
		newServerConfigSubsection.hostip = ConfigMutable(
				{"IP": ConfigIP([192,168,1,1]),
				 "FQDN": ConfigText("fqdname", False)
				}, newServerConfigSubsection.addressType.value)
		newServerConfigSubsection.httpport = ConfigInteger(8080, (0,65535))
		newServerConfigSubsection.vlctype = ConfigYesNo(False)
		newServerConfigSubsection.basedir = ConfigText("/", False)
		newServerConfigSubsection.pingonopen = ConfigYesNo(True)
		newServerConfigSubsection.usecachedir = ConfigYesNo(False)
		newServerConfigSubsection.cachedir = ConfigText("/media/hdd/movie", False)
		newServerConfigSubsection.dvdPath = ConfigText("", False)
		newServerConfigSubsection.transcodeVideo = ConfigYesNo()
		newServerConfigSubsection.transcodeAudio = ConfigYesNo(True)
		newServerConfigSubsection.videocodec = ConfigSelection(
				[("mp1v", "MPEG1"),
				 ("mp2v", "MPEG2")
				], "mp2v")
		newServerConfigSubsection.videobitrate = ConfigInteger(2000, (100, 9999))
		newServerConfigSubsection.audiocodec = ConfigSelection(
				[("mpga", "MPEG Layer 1 (mpga)"),
				 ("mp2a", "MPEG Layer 2 (mp2a)"),
				 ("mp3", "MPEG Layer 3 (mp3)")
				], "mp2a")
		newServerConfigSubsection.audiobitrate = ConfigInteger(128, (64, 320))
		newServerConfigSubsection.samplerate = ConfigSelection(
				[("32000", "32000"),
				 ("44100", "44100"),
				 ("48000", "48000"),
				 ("0", "0")
				], "44100")
		newServerConfigSubsection.audiochannels = ConfigInteger(2, (1, 9))
		newServerConfigSubsection.videonorm = ConfigSelection(
				[("720,576,4:3,25,i", "720 x 576 (4:3) @ 25fps (PAL)"),
				 ("720,576,16:9,25,i", "720 x 576 (16:9) @ 25fps (PAL)"),
				 ("704,576,4:3,25,i", "704 x 576 (4:3) @ 25fps (PAL)"),
				 ("704,440,4:3,25,i", "704 x 440 (4:3) @ 25fps (PAL)"),
				 ("704,420,4:3,25,i", "704 x 420 (4:3) @ 25fps (PAL)"),
				 ("704,400,4:3,25,i", "704 x 400 (4:3) @ 25fps (PAL)"),
				 ("704,576,16:9,25,i", "704 x 576 (16:9) @ 25fps (PAL)"),
				 ("544,576,4:3,25,i", "544 x 576 (4:3) @ 25fps (PAL)"),
				 ("544,576,16:9,25,i", "544 x 576 (16:9) @ 25fps (PAL)"),
				 ("480,576,4:3,25,i", "480 x 576 (4:3) @ 25fps (PAL)"),
				 ("480,576,16:9,25,i", "480 x 576 (16:9) @ 25fps (PAL)"),
				 ("480,288,4:3,25,i", "480 x 288 (4:3) @ 25fps (PAL)"),
				 ("480,288,16:9,25,i", "480 x 288 (16:9) @ 25fps (PAL)"),
				 ("352,576,4:3,25,i", "352 x 576 (4:3) @ 25fps (PAL)"),
				 ("352,576,16:9,25,i", "352 x 576 (16:9) @ 25fps (PAL)"),
				 ("352,288,4:3,25,i", "352 x 288 (4:3) @ 25fps (PAL)"),
				 ("352,288,16:9,25,i", "352 x 288 (16:9) @ 25fps (PAL)"),
				 ("720,480,4:3,30,i", "720 x 480 (4:3) @ 30fps (NTSC)"),
				 ("720,480,16:9,30,i", "720 x 480 (16:9) @ 30fps (NTSC)"),
				 ("640,480,4:3,30,i", "640 x 480 (4:3) @ 30fps (NTSC)"),
				 ("640,480,16:9,30,i", "640 x 480 (16:9) @ 30fps (NTSC)"),
				 ("544,480,4:3,30,i", "544 x 480 (4:3) @ 30fps (NTSC)"),
				 ("544,480,16:9,30,i", "544 x 480 (16:9) @ 30fps (NTSC)"),
				 ("480,480,4:3,30,i", "480 x 480 (4:3) @ 30fps (NTSC)"),
				 ("480,480,16:9,30,i", "480 x 480 (16:9) @ 30fps (NTSC)"),
				 ("480,240,4:3,30,i", "480 x 240 (4:3) @ 30fps (NTSC)"),
				 ("480,240,16:9,30,i", "480 x 240 (16:9) @ 30fps (NTSC)"),
				 ("353,480,4:3,30,i", "353 x 480 (4:3) @ 30fps (NTSC)"),
				 ("353,480,16:9,30,i", "353 x 480 (16:9) @ 30fps (NTSC)"),
				 ("352,240,4:3,30,i", "352 x 240 (4:3) @ 30fps (NTSC)"),
				 ("352,240,16:9,30,i", "352 x 240 (16:9) @ 30fps (NTSC)"),
				 ("1920,1080,16:9,50,p", "1920 x 1080 (16:9) @ 50p (HTDV)"),
				 ("1920,1080,16:9,25,p", "1920 x 1080 (16:9) @ 25p (HTDV)"),
				 ("1920,1080,16:9,25,i", "1920 x 1080 (16:9) @ 25i (HTDV)"),
				 ("1440,1080,16:9,25,p", "1440 x 1080 (16:9) @ 25p (HTDV)"),
				 ("1440,1080,16:9,25,i", "1440 x 1080 (16:9) @ 25i (HTDV)"),
				 ("1280,720,16:9,50,p", "1280 x 720 (16:9) @ 50p (HDTV)"),
				 ("1280,720,16:9,25,p", "1280 x 720 (16:9) @ 25p (HDTV)"),
				 ("720,576,16:9,50,p", "720 x 576 (16:9) @ 50p (HDTV)")
				], "352,288,4:3,25,i")
		newServerConfigSubsection.overscancorrection = ConfigInteger(0, (0, 100))
		newServerConfigSubsection.soverlay = ConfigYesNo()
		newServerConfigSubsection.subyellow = ConfigYesNo()
		
		newServerConfigSubsection.langInputType = ConfigSelectionExtended(
				[("track", _("tracks")),
				 ("language", _("languages"))
				], "language")
		newServerConfigSubsection.typeAudio = ConfigMutable(
				{"track": ConfigSelection([
							("-1","-1"),
							("0","0"),
							("1","1"),
							("2","2"),
							("3","3"),
							("4","4"),
							("5","5"),
							("6","6"),
							("7","7"),
							("8","8"),
							("9","9"),
							("10","10"),
							("11","11"),
							("12","12"),
							("13","13"),
							("14","14"),
							("15","15")
							],"-1"),
				 "language": ConfigSelection([
							("---", "None"),
							("ara", "Arabic"),
							("baq", "Basque"),
							("hrv", "Croatian"),
							("cze", "Czech"),
							("dan", "Danish"),
							("dut", "Dutch"),
							("eng", "English"),
							("est", "Estonian"),
							("fin", "Finnish"),
							("fra", "French"),
							("ger", "German"),
							("gre", "Greek"),
							("hun", "Hungarian"),
							("ita", "Italian"),
							("lat", "Latvian"),
							("lit", "Lithuanian"),
							("nob", "Norwegian"),
							("pol", "Polish"),
							("por", "Portuguese"),
							("fas", "Persian"),
							("ron", "Romanian"),
							("rus", "Russian"),
							("srp", "Serbian"),
							("slk", "Slovak"),
							("slv", "Slovenian"),
							("spa", "Spanish"),
							("swe", "Swedish"),
							("tur", "Turkish")
							],"---")
				}, newServerConfigSubsection.langInputType.value)
		newServerConfigSubsection.typeSubtitles = ConfigMutable(
				{"track": ConfigSelection([
							("-1","-1"),
							("0","0"),
							("1","1"),
							("2","2"),
							("3","3"),
							("4","4"),
							("5","5"),
							("6","6"),
							("7","7"),
							("8","8"),
							("9","9"),
							("10","10"),
							("11","11"),
							("12","12"),
							("13","13"),
							("14","14"),
							("15","15")
							],"-1"),
				 "language": ConfigSelection([
							("---", "None"),
							("ara", "Arabic"),
							("baq", "Basque"),
							("hrv", "Croatian"),
							("cze", "Czech"),
							("dan", "Danish"),
							("dut", "Dutch"),
							("eng", "English"),
							("est", "Estonian"),
							("fin", "Finnish"),
							("fra", "French"),
							("ger", "German"),
							("gre", "Greek"),
							("hun", "Hungarian"),
							("ita", "Italian"),
							("lat", "Latvian"),
							("lit", "Lithuanian"),
							("nob", "Norwegian"),
							("pol", "Polish"),
							("por", "Portuguese"),
							("fas", "Persian"),
							("ron", "Romanian"),
							("rus", "Russian"),
							("srp", "Serbian"),
							("slk", "Slovak"),
							("slv", "Slovenian"),
							("spa", "Spanish"),
							("swe", "Swedish"),
							("tur", "Turkish")
							],"---")
				}, newServerConfigSubsection.langInputType.value)

		newServer = VlcServer(newServerConfigSubsection)

		self.serverlist.append(newServer)

		return newServer
Exemplo n.º 41
0
#
# Record Indicator Plugin for Enigma2
# Coded by vlamo (c) 2012
#
# Version: 1.0-rc0 (17.01.2012 00:22)
# Support: http://dream.altmaster.net/
#

from Plugins.Plugin import PluginDescriptor
from Components.config import config, ConfigSubsection, ConfigBoolean, ConfigInteger
from Screens.Screen import Screen
from enigma import iRecordableService, ePoint
import RecIndicatorSetup

Indicator = None
config.plugins.RecIndicator = ConfigSubsection()
config.plugins.RecIndicator.enable = ConfigBoolean(True)
config.plugins.RecIndicator.x = ConfigInteger(default=60, limits=(0, 9999))
config.plugins.RecIndicator.y = ConfigInteger(default=60, limits=(0, 9999))


class RecIndicator(Screen):
    skin = """
		<screen name="RecIndicator" title="Records Indicator" flags="wfNoBorder" position="60,60" size="36,36" zPosition="-1" backgroundColor="transparent" >
			<widget source="session.RecordState" render="Pixmap" pixmap="skin_default/icons/icon_rec.png" position="0,0" size="36,36" alphatest="on">
				<convert type="ConditionalShowHide">Blink</convert>
			</widget>  
		</screen>"""

    def __init__(self, session):
        self.reclist = {}
Exemplo n.º 42
0
def initProfileConfig():
	s = ConfigSubsection()
	s.name =  ConfigText(default = "")
	s.code= ConfigText(default = "")
	config.plugins.Cradio.stations.append(s)
	return s
Exemplo n.º 43
0
def initWeatherPluginEntryConfig():
	s = ConfigSubsection()
	s.city = ConfigText(default = "Heidelberg", visible_width = 50, fixed_size = False)
	s.language = ConfigText(default = "de", visible_width = 50, fixed_size = False)
	config.plugins.WeatherPlugin.Entries.append(s)
	return s
Exemplo n.º 44
0
class DVDProject:
	MAX_SL = 4480
	MAX_DL = 8150
	def __init__(self):
		self.titles = [ ]
		self.target = None
		self.settings = ConfigSubsection()
		self.settings.name = ConfigText(fixed_size = False, visible_width = 40)
		self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("Dreambox format data DVD (HDTV compatible)"))])
		self.settings.titlesetmode = ConfigSelection(choices = [("single", _("Simple titleset (compatibility for legacy players)")), ("multi", _("Complex (allows mixing audio tracks and aspects)"))], default="multi")
		self.settings.output = ConfigSelection(choices = [("iso", _("Create DVD-ISO")), ("dvd", _("Burn DVD"))])
		self.settings.isopath = ConfigText(fixed_size = False, visible_width = 40)
		self.settings.dataformat = ConfigSelection(choices = [("iso9660_1", ("ISO9660 Level 1")), ("iso9660_4", ("ISO9660 version 2")), ("udf", ("UDF"))])
		self.settings.menutemplate = ConfigFilename()
		self.settings.vmgm = ConfigFilename()
		self.filekeys = ["vmgm", "isopath", "menutemplate"]
		self.menutemplate = MenuTemplate()
		self.error = ""
		self.session = None

	def addService(self, service):
		title = DVDTitle.DVDTitle(self)
		title.addService(service)
		self.titles.append(title)
		return title

	def saveProject(self, path):
		from Tools.XMLTools import stringToXML
		list = []
		list.append('<?xml version="1.0" encoding="utf-8" ?>\n')
		list.append('<DreamDVDBurnerProject>\n')
		list.append('\t<settings ')
		for key, val in self.settings.dict().iteritems():
			list.append( key + '="' + str(val.getValue()) + '" ' )
		list.append('/>\n')
		list.append('\t<titles>\n')
		for title in self.titles:
			list.append('\t\t<title>\n')
			list.append('\t\t\t<path>')
			list.append(stringToXML(title.source.getPath()))
			list.append('</path>\n')
			list.append('\t\t\t<properties ')
			audiotracks = []
			for key, val in title.properties.dict().iteritems():
				if type(val) is ConfigSubList:
					audiotracks.append('\t\t\t<audiotracks>\n')
					for audiotrack in val:
						audiotracks.append('\t\t\t\t<audiotrack ')
						for subkey, subval in audiotrack.dict().iteritems():
							audiotracks.append( subkey + '="' + str(subval.getValue()) + '" ' )
						audiotracks.append(' />\n')
					audiotracks.append('\t\t\t</audiotracks>\n')
				else:
					list.append( key + '="' + str(val.getValue()) + '" ' )
			list.append('/>\n')
			for line in audiotracks:
				list.append(line)
			list.append('\t\t</title>\n')
		list.append('\t</titles>\n')
		list.append('</DreamDVDBurnerProject>\n')

		name = self.settings.name.getValue()
		i = 0
		filename = path + name + ".ddvdp.xml"
		while fileExists(filename):
			i = i+1
			filename = path + name + str(i).zfill(3) + ".ddvdp.xml"
		try:	
			file = open(filename, "w")
			for x in list:
				file.write(x)
			file.close()
		except:
			return False
		return filename

	def load(self, filename):
		ret = self.loadProject(filename)
		if ret:
			ret = self.menutemplate.loadTemplate(self.settings.menutemplate.getValue())
			self.error += self.menutemplate.error
		return ret

	def loadProject(self, filename):
		#try:
			if not fileExists(filename):
				self.error = "xml file not found!"
				#raise AttributeError
			file = open(filename, "r")
			data = file.read().decode("utf-8").replace('&',"&amp;").encode("ascii",'xmlcharrefreplace')
			file.close()
			projectfiledom = xml.dom.minidom.parseString(data)
			for node in projectfiledom.childNodes[0].childNodes:
			  print "node:", node
			  if node.nodeType == xml.dom.minidom.Element.nodeType:
			    if node.tagName == 'settings':
				self.xmlAttributesToConfig(node, self.settings)
			    elif node.tagName == 'titles':
				self.xmlGetTitleNodeRecursive(node)
				
			for key in self.filekeys:
				val = self.settings.dict()[key].getValue()
				if not fileExists(val):
					self.error += "\n%s '%s' not found" % (key, val)
		#except AttributeError:
		  	#print "loadProject AttributeError", self.error
			#self.error += (" in project '%s'") % (filename)
			#return False
			return True

	def xmlAttributesToConfig(self, node, config):
		try:
			i = 0
			#if node.attributes.length < len(config.dict())-1:
				#self.error = "project attributes missing"
				#raise AttributeError
			while i < node.attributes.length:
				item = node.attributes.item(i)
				key = item.name.encode("utf-8")
				try:
					val = eval(item.nodeValue)
				except (NameError, SyntaxError):
					val = item.nodeValue.encode("utf-8")
				try:
					print "config[%s].setValue(%s)" % (key, val)
					config.dict()[key].setValue(val)
				except (KeyError):
					self.error = "unknown attribute '%s'" % (key)
					print "KeyError", self.error
					raise AttributeError
				i += 1
		except AttributeError:
			self.error += (" XML attribute error '%s'") % node.toxml()
			return False

	def xmlGetTitleNodeRecursive(self, node, title_idx = -1):
		print "[xmlGetTitleNodeRecursive]", title_idx, node
		print node.childNodes
		for subnode in node.childNodes:
		  print "xmlGetTitleNodeRecursive subnode:", subnode
		  if subnode.nodeType == xml.dom.minidom.Element.nodeType:
		    if subnode.tagName == 'title':
			title_idx += 1
			title = DVDTitle.DVDTitle(self)
			self.titles.append(title)
			self.xmlGetTitleNodeRecursive(subnode, title_idx)
		    if subnode.tagName == 'path':
			print "path:", subnode.firstChild.data
			filename = subnode.firstChild.data
			self.titles[title_idx].addFile(filename.encode("utf-8"))
		    if subnode.tagName == 'properties':
			self.xmlAttributesToConfig(node, self.titles[title_idx].properties)
		    if subnode.tagName == 'audiotracks':
			self.xmlGetTitleNodeRecursive(subnode, title_idx)
		    if subnode.tagName == 'audiotrack':
			print "audiotrack...", subnode.toxml()

	def getSize(self):
		totalsize = 0
		for title in self.titles:
			totalsize += title.estimatedDiskspace
		return totalsize

	size = property(getSize)
Exemplo n.º 45
0
	def createConfig(self, frontendData):
		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 }

		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)
				defaultSat["modulation"] = frontendData.get("modulation", eDVBFrontendParametersSatellite.Modulation_QPSK)
				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["orbpos"] = frontendData.get("orbital_position", 0)

		self.scan_sat = ConfigSubsection()
		self.scan_clearallservices = ConfigSelection(default = "no", choices = [("no", _("no")), ("yes", _("yes")), ("yes_hold_feeds", _("yes (keep feeds)"))])
		self.scan_onlyfree = ConfigYesNo(default = False)
		self.scan_networkScan = ConfigYesNo(default = False)

		nim_list = []
		for n in nimmanager.nim_slots:
			if hasattr(n, 'isFBCLink') and n.isFBCLink():
				continue
			if n.config_mode == "nothing":
				continue
			if n.isCompatible("DVB-S") and len(nimmanager.getSatListForNim(n.slot)) < 1:
				if n.config_mode in ("advanced", "simple"):
					config.Nims[n.slot].configMode.value = "nothing"
					config.Nims[n.slot].configMode.save()
				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)

		self.scan_sat.bs_system = ConfigSelection(default = eDVBFrontendParametersSatellite.System_DVB_S2, 
			choices = [ (eDVBFrontendParametersSatellite.System_DVB_S2, _("DVB-S + DVB-S2")),
				(eDVBFrontendParametersSatellite.System_DVB_S, _("DVB-S only"))])

		self.scan_sat.bs_accuracy = ConfigSelection(default = 2, choices = [ (1, "1"), (2, "2"), (3, "3"), (4, "4"), (5, "5")])
		self.search_type = ConfigSelection(default = 0, choices = [
			(0, _("scan for channels")),
			(1, _("save to XML file"))])

		self.scan_sat.bs_horizontal = ConfigYesNo(default = True)
		self.scan_sat.bs_vertical = ConfigYesNo(default = True)
		self.nim_sat_frequency_range = []
		self.nim_sat_band_cutoff_frequency = []
		self.scan_satselection = []
		for slot in nimmanager.nim_slots:
			slot_id = slot.slot
			if slot.isCompatible("DVB-S"):
				satlist_for_slot = self.satList[slot_id]
				self.scan_satselection.append(getConfigSatlist(defaultSat["orbpos"], satlist_for_slot))
				sat_freq_range = {(10700000, 12750000) }
				sat_band_cutoff = {11700000 }
				for sat in satlist_for_slot:
					orbpos = sat[0]
				self.nim_sat_frequency_range.append(sat_freq_range)
				self.nim_sat_band_cutoff_frequency.append(sat_band_cutoff)
			else:
				self.nim_sat_frequency_range.append(None)
				self.nim_sat_band_cutoff_frequency.append(None)
				self.scan_satselection.append(None)
		return True
Exemplo n.º 46
0
debug_msg_on = False
def printDebugMsg(msg):
	global debug_msg_on
	if debug_msg_on:
		print "[Wireless Access Point] ", msg

class fixedValue:
	def __init__(self, value = ""):
		self.value = value

ORIG_HOSTAPD_CONF = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/WirelessAccessPoint/hostapd.conf.orig")
HOSTAPD_CONF = "/etc/hostapd.conf"
HOSTAPD_CONF_BACK = "/etc/hostapd.conf.linuxap.back"

apModeConfig = ConfigSubsection()
apModeConfig.useap = ConfigYesNo(default = False)
apModeConfig.setupmode = ConfigSelection(default = "simple", choices = [ ("simple", "Simple"), ("advanced", "Advanced") ] )
#apModeConfig.wirelessdevice = fixedValue(value = "")
apModeConfig.branch = fixedValue(value = "br0")
apModeConfig.driver = fixedValue(value = "nl80211")
apModeConfig.wirelessmode = ConfigSelection(default = "g", choices = [ ("b", "802.11b"), ("a", "802.11a"), ("g", "802.11g") ] )
apModeConfig.channel = ConfigInteger(default = 1, limits = (1,13) )
apModeConfig.ssid = ConfigText(default = "Vuplus AP", visible_width = 50, fixed_size = False)
apModeConfig.beacon = ConfigInteger(default = 100, limits = (15,65535))
apModeConfig.rts_threshold = ConfigInteger(default = 2347, limits = (0,2347) )
apModeConfig.fragm_threshold = ConfigInteger(default = 2346, limits = (256,2346) )
apModeConfig.preamble = ConfigSelection(default = "0", choices = [ ("0", "Long"), ("1", "Short") ] )
apModeConfig.ignore_broadcast_ssid = ConfigSelection(default = "0", choices = [ ("0", _("disabled")), ("1", _("enabled")) ])

apModeConfig.encrypt = ConfigYesNo(default = False)
Exemplo n.º 47
0
# for localized messages
from . import _, PluginLanguageDomain

from Plugins.Plugin import PluginDescriptor
from Components.ActionMap import ActionMap
from Components.Sources.StaticText import StaticText
from Components.config import config, configfile, ConfigSubsection, ConfigIP, ConfigText, ConfigInteger, ConfigYesNo, ConfigSelection, ConfigClock, NoSave, ConfigNumber
from Screens.Setup import Setup
from Components.SystemInfo import SystemInfo
from Screens.MessageBox import MessageBox  # for are you sure questions after config changes

from ChannelsImporter import ChannelsImporter

from scheduler import autostart

config.plugins.ChannelsImporter = ConfigSubsection()
config.plugins.ChannelsImporter.ip = ConfigIP(default=[0, 0, 0, 0])
config.plugins.ChannelsImporter.username = ConfigText(default="root",
                                                      fixed_size=False)
config.plugins.ChannelsImporter.password = ConfigText(default="",
                                                      fixed_size=False)
config.plugins.ChannelsImporter.port = ConfigInteger(21, (0, 65535))
config.plugins.ChannelsImporter.passive = ConfigYesNo(False)
config.plugins.ChannelsImporter.importEPG = ConfigYesNo(False)
config.plugins.ChannelsImporter.retrycount = NoSave(ConfigNumber(default=0))
config.plugins.ChannelsImporter.nextscheduletime = NoSave(
    ConfigNumber(default=0))
config.plugins.ChannelsImporter.importOnRestart = ConfigYesNo(False)
config.plugins.ChannelsImporter.enableSchedule = ConfigYesNo(False)
config.plugins.ChannelsImporter.extensions = ConfigYesNo(default=False)
config.plugins.ChannelsImporter.setupFallback = ConfigYesNo(default=False)
Exemplo n.º 48
0
from Components.config import config, ConfigSubsection, ConfigBoolean, ConfigInteger, getConfigListEntry, ConfigNothing, ConfigSelection, ConfigOnOff
from Components.ConfigList import ConfigListScreen
from Plugins.Plugin import PluginDescriptor
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.Sources.List import List
from Screens.InfoBar import InfoBarTimeshift as InfoBarTimeshift
from enigma import eConsoleAppContainer, eTimer
import os

autoswap_plugin = "/usr/lib/enigma2/python/Plugins/Extensions/AutoSwap"
autoswap_checktime = 5
autoswap_sfdisk = "/tmp/sfdisk.log"

yes_no_descriptions = {False: _("no"), True: _("yes")}
config.plugins.autoswap = ConfigSubsection()
config.plugins.autoswap.enable = ConfigBoolean(
    default=True, descriptions=yes_no_descriptions)
config.plugins.autoswap.boot = ConfigBoolean(default=True,
                                             descriptions=yes_no_descriptions)
config.plugins.autoswap.ignorehdd = ConfigBoolean(
    default=True, descriptions=yes_no_descriptions)
config.plugins.autoswap.swappiness = ConfigInteger(default=0, limits=(0, 100))
config.plugins.autoswap.requests = ConfigInteger(default=512,
                                                 limits=(128, 4096))


def startAutoSwap(session, **kwargs):
    session.open(AutoSwapConfiguration)

Exemplo n.º 49
0
#       Performance improvement: Check timerentry StateChange only if option
#       "Timerlist cleanup immediately after recording" is set
#       Help button added
#       Cleanup crashlog feature invalidated for DMM plugin feed distribution
# 0.1.5 Fix infinite loop when timerlist cleanup is set to option "immediately after recording"
# 0.1.6 Fix crash if settings backup file date ends with "2"
# 0.1.7 Cleanup of orphaned movie files modified to support EMC v3
# 0.1.8 Performance improvement: avoid duplicate cleanup of orphaned movie files if EMC movie_homepath is same as E2 moviePath
# 0.1.9	Remove orphaned files in movie path marked for E2 smooth deletion (during session start only, to avoid conflicting E2)
#		Simplify translation code: Setting the os LANGUAGE variable isn't needed anymore
###############################################################################  
pluginPrintname = "[AutomaticCleanup Ver. %s]" %VERSION
DEBUG = False # If set True, plugin won't remove any file physically, instead prints file names in log for verification purposes
###############################################################################

config.plugins.AutomaticCleanup = ConfigSubsection()
config.plugins.AutomaticCleanup.deleteCrashlogsOlderThan = ConfigSelection(default = "-1",
	choices = [("-1",_("void"))])
config.plugins.AutomaticCleanup.keepCrashlogs = ConfigSelection(default = "-1",
	choices = [("-1",_("all"))])
config.plugins.AutomaticCleanup.deleteSettingsOlderThan = ConfigSelection(default = "-1",
	choices = [("-1",_("cleanup disabled")),("183",_("older than 6 months")),("91",_("older than 3 months")),("28",_("older than 4 weeks")),("14",_("older than 2 weeks")),("7",_("older than 1 week"))])
config.plugins.AutomaticCleanup.keepSettings = ConfigSelection(default = "-1",
	choices = [("-1",_("all")), ("10",_("last 10")),("5",_("last 5")),("3",_("last 3")),("2",_("last 2")),("1",_("only last one"))])
config.plugins.AutomaticCleanup.deleteTimersOlderThan = ConfigSelection(default = "-1",
	choices = [("-1",_("cleanup disabled")),("42",_("older than 6 weeks")),("28",_("older than 4 weeks")),("14",_("older than 2 weeks")),("7",_("older than 1 week")),("3",_("older than 3 days")),("1",_("older than 1 day")),("0",_("immediately after recording"))])
config.plugins.AutomaticCleanup.deleteOrphanedMovieFiles = ConfigYesNo(default = False)


class AutomaticCleanupSetup(Screen, ConfigListScreen): # config
Exemplo n.º 50
0
from Screens.Screen import Screen
from Components.ConfigList import ConfigListScreen
from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSelection, ConfigSlider, getConfigListEntry
from Components.Sources.StaticText import StaticText

modelist = {
    "off": _("Off"),
    "auto": _("Auto"),
    "sidebyside": _("Side by Side"),
    "topandbottom": _("Top and Bottom")
}
setmodelist = {"mode1": _("Mode 1"), "mode2": _("Mode 2")}

config.plugins.UI3DSetup = ConfigSubsection()
config.plugins.UI3DSetup.mode = ConfigSelection(choices=modelist,
                                                default="auto")
config.plugins.UI3DSetup.znorm = ConfigInteger(default=0)
config.plugins.UI3DSetup.setmode = ConfigSelection(choices=setmodelist,
                                                   default="mode1")


class UI3DSetupScreen(Screen, ConfigListScreen):
    skin = """
		<screen position="center,center" size="400,250" title="UI 3D setup" >
			<ePixmap pixmap="buttons/red.png" position="30,10" size="140,40" alphatest="on" />
			<ePixmap pixmap="buttons/green.png" position="230,10" size="140,40" alphatest="on" />

			<widget source="key_red" render="Label" position="30,10" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
			<widget source="key_green" render="Label" position="230,10" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />

			<widget name="config" zPosition="2" position="5,70" size="380,180" scrollbarMode="showOnDemand" transparent="1" />
Exemplo n.º 51
0
from twisted.internet import defer
from twisted.web.client import getPage, downloadPage
from urllib import quote
from urllib import quote as urllib_quote
from Components.Pixmap import Pixmap
from GlobalFunctions import Showiframe
from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_VALIGN_CENTER, ePicLoad, eEnv
from Tools.Directories import fileExists, pathExists
from Components.AVSwitch import AVSwitch
from Components.config import ConfigSubsection, getConfigListEntry, ConfigText, ConfigSelection, ConfigSubList, configfile, ConfigInteger, config
from Components.ConfigList import ConfigList, ConfigListScreen
import time
import os
import commands

config.plugins.mc_wi = ConfigSubsection()
config.plugins.mc_wi.entrycount =  ConfigInteger(0)
config.plugins.mc_wi.Entry = ConfigSubList()
def initWeatherPluginEntryConfig():
	s = ConfigSubsection()
	s.city = ConfigText(default = "Villach", visible_width = 100, fixed_size = False)
	s.degreetype = ConfigSelection(choices = [("C", _("metric system")), ("F", _("imperial system"))], default = "C")
	s.weatherlocationcode = ConfigText(default = "Kärnten", visible_width = 100, fixed_size = False)
	config.plugins.mc_wi.Entry.append(s)
	return s
def initConfig():
	count = config.plugins.mc_wi.entrycount.value
	if count != 0:
		i = 0
		while i < count:
			initWeatherPluginEntryConfig()
Exemplo n.º 52
0
	def new(self):
		newServerConfigSubsection = ConfigSubsection()
		config.plugins.vlcplayer.servers.append(newServerConfigSubsection)
		newServerConfigSubsection.name = ConfigText("Server " + str(self.__getServerCount()), False)
		if newServerConfigSubsection.name.value == newServerConfigSubsection.name.default:
			newServerConfigSubsection.name.default = ""
		newServerConfigSubsection.addressType = ConfigSelectionExtended(
				[("FQDN", "FQDN"),
				 ("IP", "IP-Address")
				], "IP")
		newServerConfigSubsection.hostip = ConfigMutable(
				{"IP": ConfigIP([192,168,1,1]),
				 "FQDN": ConfigText("fqdname", False)
				}, newServerConfigSubsection.addressType.value)
		newServerConfigSubsection.httpport = ConfigInteger(8080, (0,65535))
		newServerConfigSubsection.password = ConfigText("", False)
		newServerConfigSubsection.basedir = ConfigText("/", False)
		newServerConfigSubsection.dvdPath = ConfigText("", False)
		newServerConfigSubsection.transcodeVideo = ConfigYesNo()
		newServerConfigSubsection.transcodeAudio = ConfigYesNo(True)
		newServerConfigSubsection.videocodec = ConfigSelection(
				[("mp1v", "MPEG1"),
				 ("mp2v", "MPEG2")
				], "mp2v")
		newServerConfigSubsection.videobitrate = ConfigInteger(2000, (100, 9999))
		newServerConfigSubsection.audiocodec = ConfigSelection(
				[("mpga", "MPEG Layer 1 (mpga)"),
				 ("mp2a", "MPEG Layer 2 (mp2a)"),
				 ("mp3", "MPEG Layer 3 (mp3)")
				], "mp2a")
		newServerConfigSubsection.audiobitrate = ConfigInteger(128, (64, 320))
		newServerConfigSubsection.samplerate = ConfigSelection(
				[("32000", "32000"),
				 ("44100", "44100"),
				 ("48000", "48000")
				], "44100")
		newServerConfigSubsection.audiochannels = ConfigInteger(2, (1, 9))
		newServerConfigSubsection.videonorm = ConfigSelection(
				[("720,576,4:3,25,i", "720 x 576 (4:3) @ 25fps (PAL)"),
				 ("720,576,16:9,25,i", "720 x 576 (16:9) @ 25fps (PAL)"),
				 ("720,576,16:9,24,i", "720 x 576 (16:9) @ 24fps (PAL)"), 
				 ("704,576,4:3,25,i", "704 x 576 (4:3) @ 25fps (PAL)"),
				 ("704,576,16:9,25,i", "704 x 576 (16:9) @ 25fps (PAL)"),
				 ("544,576,4:3,25,i", "544 x 576 (4:3) @ 25fps (PAL)"),
				 ("544,576,16:9,25,i", "544 x 576 (16:9) @ 25fps (PAL)"),
				 ("480,576,4:3,25,i", "480 x 576 (4:3) @ 25fps (PAL)"),
				 ("480,576,16:9,25,i", "480 x 576 (16:9) @ 25fps (PAL)"),
				 ("480,288,4:3,25,i", "480 x 288 (4:3) @ 25fps (PAL)"),
				 ("480,288,16:9,25,i", "480 x 288 (16:9) @ 25fps (PAL)"),
				 ("352,576,4:3,25,i", "352 x 576 (4:3) @ 25fps (PAL)"),
				 ("352,576,16:9,25,i", "352 x 576 (16:9) @ 25fps (PAL)"),
				 ("352,288,4:3,25,i", "352 x 288 (4:3) @ 25fps (PAL)"),
				 ("352,288,16:9,25,i", "352 x 288 (16:9) @ 25fps (PAL)"),
				 ("720,480,4:3,30,i", "720 x 480 (4:3) @ 30fps (NTSC)"),
				 ("720,480,16:9,30,i", "720 x 480 (16:9) @ 30fps (NTSC)"),
				 ("640,480,4:3,30,i", "640 x 480 (4:3) @ 30fps (NTSC)"),
				 ("640,480,16:9,30,i", "640 x 480 (16:9) @ 30fps (NTSC)"),
				 ("544,480,4:3,30,i", "544 x 480 (4:3) @ 30fps (NTSC)"),
				 ("544,480,16:9,30,i", "544 x 480 (16:9) @ 30fps (NTSC)"),
				 ("480,480,4:3,30,i", "480 x 480 (4:3) @ 30fps (NTSC)"),
				 ("480,480,16:9,30,i", "480 x 480 (16:9) @ 30fps (NTSC)"),
				 ("480,240,4:3,30,i", "480 x 240 (4:3) @ 30fps (NTSC)"),
				 ("480,240,16:9,30,i", "480 x 240 (16:9) @ 30fps (NTSC)"),
				 ("353,480,4:3,30,i", "353 x 480 (4:3) @ 30fps (NTSC)"),
				 ("353,480,16:9,30,i", "353 x 480 (16:9) @ 30fps (NTSC)"),
				 ("352,240,4:3,30,i", "352 x 240 (4:3) @ 30fps (NTSC)"),
				 ("352,240,16:9,30,i", "352 x 240 (16:9) @ 30fps (NTSC)"),
				 ("1920,1080,16:9,50,p", "1920 x 1080 (16:9) @ 50p (HTDV)"),
				 ("1920,1080,16:9,25,p", "1920 x 1080 (16:9) @ 25p (HTDV)"),
				 ("1920,1080,16:9,25,i", "1920 x 1080 (16:9) @ 25i (HTDV)"),
				 ("1440,1080,16:9,25,p", "1440 x 1080 (16:9) @ 25p (HTDV)"),
				 ("1440,1080,16:9,25,i", "1440 x 1080 (16:9) @ 25i (HTDV)"),
				 ("1280,720,16:9,50,p", "1280 x 720 (16:9) @ 50p (HDTV)"),
				 ("1280,720,16:9,25,p", "1280 x 720 (16:9) @ 25p (HDTV)"),
				 ("720,576,16:9,50,p", "720 x 576 (16:9) @ 50p (HDTV)")
				], "352,288,4:3,25,i")
		newServerConfigSubsection.overscancorrection = ConfigInteger(0, (0, 100))
		newServerConfigSubsection.soverlay = ConfigYesNo()
		newServer = VlcServer(newServerConfigSubsection)

		self.serverlist.append(newServer)

		return newServer
Exemplo n.º 53
0
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(ConfigListScreen, Screen):
    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

        self["ok"] = Button(_("OK"))
Exemplo n.º 54
0
from Plugins.Plugin import PluginDescriptor
from Components.Console import Console
from Components.Button import Button
from Components.ActionMap import ActionMap
from Components.ConfigList import ConfigList, ConfigListScreen
from Components.config import config, configfile, ConfigSubsection, getConfigListEntry, ConfigSelection
from enigma import iPlayableService, eServiceCenter, eTimer, eActionMap
from Components.ServiceEventTracker import ServiceEventTracker
from Components.ServiceList import ServiceList
from Screens.InfoBar import InfoBar
from time import localtime, time
import Screens.Standby
import subprocess
from Tools.Directories import resolveFilename, SCOPE_PLUGINS

config.plugins.VFD_SF8 = ConfigSubsection()
config.plugins.VFD_SF8.showClock = ConfigSelection(
    default="True_Switch",
    choices=[("False", _("Channelnumber in Standby off")),
             ("True", _("Channelnumber in Standby Clock")),
             ("True_Switch", _("Channelnumber/Clock in Standby Clock")),
             ("True_All", _("Clock always")), ("Off", _("Always off"))])
config.plugins.VFD_SF8.timeMode = ConfigSelection(default="24h",
                                                  choices=[("12h"), ("24h")])

# this bitmap is not complete.
# please populate it as you want.
ascii_bitmap = [
    0x0,
    0x0,
    0x0,
Exemplo n.º 55
0
    ('no', 'Norsk'),
    ('pl', 'Polski'),
    ('pt', 'Português'),
    ('ro', 'Română'),
    ('ru', 'Pусский'),
    ('sh', 'Srpski'),
    ('sk', 'Slovenčina'),
    ('fi', 'suomi'),
    ('sv', 'svenska'),
    ('uk', 'Український'),
    ('ar', 'العربية'),
    ('bg', 'български език'),
    ('el', 'ελληνικά'),
    ('sq', 'shqip')
]
config.plugins.XStreamity = ConfigSubsection()

cfg = config.plugins.XStreamity

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', 'GStreamer(8193)'))

Exemplo n.º 56
0
    ConfigPassword,
    ConfigYesNo,
    ConfigSelection,
    ConfigSet,
    ConfigSubList,
    ConfigNumber,
    NoSave,
)
from Components.ConfigList import ConfigListScreen
from Components.Sources.StaticText import StaticText

from GrowleeConnection import gotNotification, emergencyDisable, growleeConnection

from . import NOTIFICATIONID

growlee = ConfigSubsection()
config.plugins.growlee = growlee
growlee.hostcount = ConfigNumber(default=0)
growlee.hosts = ConfigSubList()


def addHost(name):
    s = ConfigSubsection()
    s.name = ConfigText(default=name, fixed_size=False)
    s.enable_incoming = ConfigYesNo(default=False)
    s.enable_outgoing = ConfigYesNo(default=False)
    s.address = ConfigText(fixed_size=False)
    s.password = ConfigPassword()
    s.protocol = ConfigSelection(
        default="growl",
        choices=[
Exemplo n.º 57
0
    0x86: "<Set Stream Path>",
    0x87: "<Device Vendor ID>",
    0x89: "<Vendor Command>",
    0x8c: "<Give Device Vendor ID>",
    0x8d: "<Menu Request>",
    0x8e: "<Menu Status>",
    0x8f: "<Give Device Power Status>",
    0x90: "<Report Power Status>",
    0x91: "<Get menu language>",
    0x9e: "<CEC Version>",
    0x9d: "<Inactive Source>",
    0x9e: "<CEC Version>",
    0x9f: "<Get CEC Version>",
}

config.hdmicec = ConfigSubsection()
config.hdmicec.enabled = ConfigYesNo(default=False)
config.hdmicec.control_tv_standby = ConfigYesNo(default=True)
config.hdmicec.control_tv_wakeup = ConfigYesNo(default=True)
config.hdmicec.report_active_source = ConfigYesNo(default=True)
config.hdmicec.report_active_menu = ConfigYesNo(default=True)
config.hdmicec.handle_tv_standby = ConfigYesNo(default=True)
config.hdmicec.handle_tv_wakeup = ConfigYesNo(default=True)
config.hdmicec.tv_wakeup_detection = ConfigSelection(choices={
    "wakeup":
    _("Wakeup"),
    "requestphysicaladdress":
    _("Request for physical address report"),
    "tvreportphysicaladdress":
    _("TV physical address report"),
    "sourcerequest":
Exemplo n.º 58
0
from enigma import eTimer, eEPGCache, loadPNG, eListboxPythonMultiContent, gFont, eServiceReference, eServiceCenter, iPlayableService
from random import randint
from os import system as os_system
from time import time, gmtime, strftime
from twisted.web.client import getPage
from xml.dom.minidom import parse, parseString
from urllib import urlencode

import timer
import xml.etree.cElementTree
import Screens.Standby

##############################
#####  CONFIG SETTINGS   #####
##############################
config.plugins.tvcharts = ConfigSubsection()
config.plugins.tvcharts.enabled = ConfigYesNo(default = True)
config.plugins.tvcharts.maxentries = ConfigInteger(default=10, limits=(5, 100))
config.plugins.tvcharts.maxtimerentries = ConfigInteger(default=10, limits=(5, 100))
config.plugins.tvcharts.submittimers = ConfigYesNo(default = True)
config.plugins.tvcharts.submitplugins = ConfigYesNo(default = True)
config.plugins.tvcharts.bouquetfilter = ConfigYesNo(default = True)

##########################################################
session = [ ]

#Channellist Menu Entry
class ChannelListMenu(MenuList):
	def __init__(self, list, enableWrapAround=False):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
		self.l.setFont(0, gFont("Regular", 24))
Exemplo n.º 59
0
from os import path
from Components.Console import Console
from Screens.Screen import Screen
from Components.ActionMap import ActionMap
from Components.Label import Label
from Components.ConfigList import ConfigListScreen, ConfigList
from Components.config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet, ConfigLocations, NoSave, ConfigClock, ConfigInteger, ConfigBoolean, ConfigPassword, ConfigIP, ConfigSlider, ConfigSelectionNumber, getConfigListEntry, KEY_LEFT, KEY_RIGHT, configfile
from Components.Sources.StaticText import StaticText
from Plugins.Extensions.Infopanel.outofflash import MoveVideos_int, MoveVideos
from Components.MenuList import MenuList
from enigma import *
from Tools.LoadPixmap import LoadPixmap
from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
from glob import glob
import os
config.bootvideo = ConfigSubsection()
config.bootvideo.booting = ConfigText(default = "no Bootvideo")

class PanelList(MenuList):
	if (getDesktop(0).size().width() == 1920):
		def __init__(self, list, font0 = 32, font1 = 24, itemHeight = 50, enableWrapAround = True):
			MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
			self.l.setFont(0, gFont("Regular", font0))
			self.l.setFont(1, gFont("Regular", font1))
			self.l.setItemHeight(itemHeight)
	else:
		def __init__(self, list, font0 = 24, font1 = 16, itemHeight = 50, enableWrapAround = True):
			MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
			self.l.setFont(0, gFont("Regular", font0))
			self.l.setFont(1, gFont("Regular", font1))
			self.l.setItemHeight(itemHeight)