Пример #1
0
def InitLcd():
	if getBoxType() in ('nanoc', 'nano', 'axodinc', 'axodin', 'amikomini', 'dynaspark', 'amiko8900', 'sognorevolution', 'arguspingulux', 'arguspinguluxmini', 'arguspinguluxplus', 'sparkreloaded', 'sabsolo', 'sparklx', 'gis8120', 'gb800se', 'gb800solo', 'gb800seplus', 'gbultrase', 'gbipbox', 'tmsingle', 'tmnano2super', 'iqonios300hd', 'iqonios300hdv2', 'optimussos1plus', 'optimussos1', 'vusolo', 'et4x00', 'et5x00', 'et6x00', 'et7000', 'mixosf7', 'mixoslumi'):
		detected = False
	else:
	detected = eDBoxLCD.getInstance().detected()
	SystemInfo["Display"] = detected
	config.lcd = ConfigSubsection();
	if detected:
		def setLCDbright(configElement):
			ilcd.setBright(configElement.value);

		def setLCDcontrast(configElement):
			ilcd.setContrast(configElement.value);

		def setLCDinverted(configElement):
			ilcd.setInverted(configElement.value);

		def setLCDflipped(configElement):
			ilcd.setFlipped(configElement.value);

		standby_default = 0

		ilcd = LCD()

		if not ilcd.isOled():
			config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
			config.lcd.contrast.addNotifier(setLCDcontrast);
		else:
			config.lcd.contrast = ConfigNothing()
			standby_default = 1

		config.lcd.standby = ConfigSlider(default=standby_default, limits=(0, 10))
		config.lcd.standby.addNotifier(setLCDbright);
		config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)

		config.lcd.bright = ConfigSlider(default=5, limits=(0, 10))
		config.lcd.bright.addNotifier(setLCDbright);
		config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
		config.lcd.bright.callNotifiersOnSaveAndCancel = True

		config.lcd.invert = ConfigYesNo(default=False)
		config.lcd.invert.addNotifier(setLCDinverted);

		config.lcd.flip = ConfigYesNo(default=False)
		config.lcd.flip.addNotifier(setLCDflipped);
	else:
		def doNothing():
			pass
		config.lcd.contrast = ConfigNothing()
		config.lcd.bright = ConfigNothing()
		config.lcd.standby = ConfigNothing()
		config.lcd.bright.apply = lambda : doNothing()
		config.lcd.standby.apply = lambda : doNothing()

	config.misc.standbyCounter.addNotifier(standbyCounterChanged, initial_call = False)
Пример #2
0
def InitSetupDevices():
    def timezoneNotifier(configElement):
        timezones.activateTimezone(configElement.index)

    config.timezone = ConfigSubsection()
    config.timezone.val = ConfigSelection(
        default=timezones.getDefaultTimezone(),
        choices=timezones.getTimezoneList())
    config.timezone.val.addNotifier(timezoneNotifier)

    def keyboardNotifier(configElement):
        keyboard.activateKeyboardMap(configElement.index)

    config.keyboard = ConfigSubsection()
    config.keyboard.keymap = ConfigSelection(
        default=keyboard.getDefaultKeyboardMap(),
        choices=keyboard.getKeyboardMaplist())
    config.keyboard.keymap.addNotifier(keyboardNotifier)

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

    config.osd = ConfigSubsection()
    if getMachineBrand() == 'Zgemma':
        defaultLanguage = "en_US"
    elif getMachineBrand() == 'Beyonwiz':
        defaultLanguage = "en_GB"
    else:
        defaultLanguage = "de_DE"
    config.osd.language = ConfigText(default=defaultLanguage)
    config.osd.language.addNotifier(languageNotifier)

    config.parental = ConfigSubsection()
    config.parental.lock = ConfigOnOff(default=False)
    config.parental.setuplock = ConfigOnOff(default=False)

    config.expert = ConfigSubsection()
    config.expert.satpos = ConfigOnOff(default=True)
    config.expert.fastzap = ConfigOnOff(default=True)
    config.expert.skipconfirm = ConfigOnOff(default=False)
    config.expert.hideerrors = ConfigOnOff(default=False)
    config.expert.autoinfo = ConfigOnOff(default=True)
Пример #3
0
def InitSetupDevices():

	def timezoneNotifier(configElement):
		timezones.activateTimezone(configElement.index)

	config.timezone = ConfigSubsection()
	config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList())
	config.timezone.val.addNotifier(timezoneNotifier)

	def keyboardNotifier(configElement):
		keyboard.activateKeyboardMap(configElement.index)

	config.keyboard = ConfigSubsection()
	config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist())
	config.keyboard.keymap.addNotifier(keyboardNotifier)

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

	config.osd = ConfigSubsection();
	
	if open("/proc/stb/info/boxtype").read().strip() == "ini-9000ru":
		config.osd.language = ConfigText(default = "ru_RU");
	elif open("/proc/stb/info/boxtype").read().strip() == "ini-5000ru":
		config.osd.language = ConfigText(default = "ru_RU");
	elif open("/proc/stb/info/boxtype").read().strip() == "ini-1000ru":
		config.osd.language = ConfigText(default = "ru_RU");
	else:
		config.osd.language = ConfigText(default = "en_GB");

	config.osd.language.addNotifier(languageNotifier)

	config.parental = ConfigSubsection()
	config.parental.lock = ConfigOnOff(default = False)
	config.parental.setuplock = ConfigOnOff(default = False)

	config.expert = ConfigSubsection()
	config.expert.satpos = ConfigOnOff(default = True)
	config.expert.fastzap = ConfigOnOff(default = True)
	config.expert.skipconfirm = ConfigOnOff(default = False)
	config.expert.hideerrors = ConfigOnOff(default = False)
	config.expert.autoinfo = ConfigOnOff(default = True)
Пример #4
0
def InitTimeZones():
	config.timezone = ConfigSubsection()
	config.timezone.area = ConfigSelection(default = "Generic", choices = timezones.getTimezoneAreaList())
	def timezoneAreaChoices(configElement):
		timezones.updateTimezoneChoices(configElement.getValue(), config.timezone.val)
	config.timezone.area.addNotifier(timezoneAreaChoices, initial_call = False, immediate_feedback = True)
	config.timezone.val = ConfigSelection(default = timezones.getTimezoneDefault(), choices = timezones.getTimezoneList())
	def timezoneNotifier(configElement):
		timezones.activateTimezone(configElement.getValue(), config.timezone.area.getValue())
	config.timezone.val.addNotifier(timezoneNotifier, initial_call = True, immediate_feedback = True)
	config.timezone.val.callNotifiersOnSaveAndCancel = True
Пример #5
0
def InitRFmod():
    detected = eRFmod.getInstance().detected()
    SystemInfo["RfModulator"] = detected
    config.rfmod = ConfigSubsection()
    if detected:
        config.rfmod.enable = ConfigOnOff(default=False)
        config.rfmod.test = ConfigOnOff(default=False)
        config.rfmod.sound = ConfigOnOff(default=True)
        config.rfmod.soundcarrier = ConfigSelection(choices=[
            ("4500", "4.5 MHz"), ("5500", "5.5 MHz"), ("6000", "6.0 MHz"),
            ("6500", "6.5 MHz")
        ],
                                                    default="5500")
        config.rfmod.channel = ConfigSelection(
            default="36",
            choices=[
                "%d" % x for x in range(RFMOD_CHANNEL_MIN, RFMOD_CHANNEL_MAX)
            ])
        config.rfmod.finetune = ConfigSlider(default=5, limits=(1, 10))

        iRFmod = RFmod()

        def setFunction(configElement):
            iRFmod.setFunction(configElement.value)

        def setTestmode(configElement):
            iRFmod.setTestmode(configElement.value)

        def setSoundFunction(configElement):
            iRFmod.setSoundFunction(configElement.value)

        def setSoundCarrier(configElement):
            iRFmod.setSoundCarrier(configElement.index)

        def setChannel(configElement):
            iRFmod.setChannel(int(configElement.value))

        def setFinetune(configElement):
            iRFmod.setFinetune(configElement.value - 5)

        # this will call the "setup-val" initial
        config.rfmod.enable.addNotifier(setFunction)
        config.rfmod.test.addNotifier(setTestmode)
        config.rfmod.sound.addNotifier(setSoundFunction)
        config.rfmod.soundcarrier.addNotifier(setSoundCarrier)
        config.rfmod.channel.addNotifier(setChannel)
        config.rfmod.finetune.addNotifier(setFinetune)
    else:
        config.rfmod.enable = ConfigNothing()
        config.rfmod.test = ConfigNothing()
        config.rfmod.sound = ConfigNothing()
        config.rfmod.soundcarrier = ConfigNothing()
        config.rfmod.channel = ConfigNothing()
        config.rfmod.finetune = ConfigNothing()
Пример #6
0
def InitSetupDevices():
    def timezoneNotifier(configElement):
        timezones.activateTimezone(configElement.index)

    config.timezone = ConfigSubsection()
    config.timezone.val = ConfigSelection(
        default=timezones.getDefaultTimezone(),
        choices=timezones.getTimezoneList())
    config.timezone.val.addNotifier(timezoneNotifier)

    def keyboardNotifier(configElement):
        keyboard.activateKeyboardMap(configElement.index)

    config.keyboard = ConfigSubsection()
    config.keyboard.keymap = ConfigSelection(
        default=keyboard.getDefaultKeyboardMap(),
        choices=keyboard.getKeyboardMaplist())
    config.keyboard.keymap.addNotifier(keyboardNotifier)

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

    config.osd = ConfigSubsection()
    if getMachineBrand() in ('Vimastec'):
        config.osd.language = ConfigText(default="fr_FR")
    elif getMachineBrand() in ('Zgemma') or getBrandOEM() in ('airdigital'):
        config.osd.language = ConfigText(default="en_US")
    else:
        config.osd.language = ConfigText(default="it_IT")
    config.osd.language.addNotifier(languageNotifier)

    config.parental = ConfigSubsection()
    config.parental.lock = ConfigOnOff(default=False)
    config.parental.setuplock = ConfigOnOff(default=False)

    config.expert = ConfigSubsection()
    config.expert.satpos = ConfigOnOff(default=True)
    config.expert.fastzap = ConfigOnOff(default=True)
    config.expert.skipconfirm = ConfigOnOff(default=False)
    config.expert.hideerrors = ConfigOnOff(default=False)
    config.expert.autoinfo = ConfigOnOff(default=True)
Пример #7
0
def Init():
	config.network = ConfigSubsection()
	if SystemInfo["WOL"] and not getBoxType() == 'gbquad':
		def setWOLmode(value):
			iwol.setWolState(config.network.wol.value);
		iwol = WOL()
		config.network.wol = ConfigSelection([("disable", _("No")), ("enable", _("Yes"))], default = "disable")
		config.network.wol.addNotifier(setWOLmode, initial_call=True)
	else:
		def doNothing():
			pass
		config.network.wol = ConfigNothing()
Пример #8
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"))])
Пример #9
0
def InitSetupDevices():
    def timezoneNotifier(configElement):
        timezones.activateTimezone(configElement.index)

    config.timezone = ConfigSubsection()
    config.timezone.val = ConfigSelection(
        default=timezones.getDefaultTimezone(),
        choices=timezones.getTimezoneList())
    config.timezone.val.addNotifier(timezoneNotifier)

    def keyboardNotifier(configElement):
        keyboard.activateKeyboardMap(configElement.index)

    config.keyboard = ConfigSubsection()
    config.keyboard.keymap = ConfigSelection(
        default=keyboard.getDefaultKeyboardMap(),
        choices=keyboard.getKeyboardMaplist())
    config.keyboard.keymap.addNotifier(keyboardNotifier)

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

    config.osd = ConfigSubsection()
    config.osd.language = ConfigText(default="en_EN")
    #	if "iqon" in open("/etc/.brandtype","r").readline():
    #		config.osd.language = ConfigText(default = "de_DE");
    #	else:

    config.osd.language.addNotifier(languageNotifier)

    config.parental = ConfigSubsection()
    config.parental.lock = ConfigOnOff(default=False)
    config.parental.setuplock = ConfigOnOff(default=False)

    config.expert = ConfigSubsection()
    config.expert.satpos = ConfigOnOff(default=True)
    config.expert.fastzap = ConfigOnOff(default=True)
    config.expert.skipconfirm = ConfigOnOff(default=False)
    config.expert.hideerrors = ConfigOnOff(default=False)
    config.expert.autoinfo = ConfigOnOff(default=True)
Пример #10
0
def InitRFmod():
    detected = eRFmod.getInstance().detected()
    SystemInfo['RfModulator'] = detected
    config.rfmod = ConfigSubsection()
    if detected:
        config.rfmod.enable = ConfigOnOff(default=False)
        config.rfmod.test = ConfigOnOff(default=False)
        config.rfmod.sound = ConfigOnOff(default=True)
        config.rfmod.soundcarrier = ConfigSelection(choices=[
            ('4500', '4.5 MHz'), ('5500', '5.5 MHz'), ('6000', '6.0 MHz'),
            ('6500', '6.5 MHz')
        ],
                                                    default='5500')
        config.rfmod.channel = ConfigSelection(
            default='36',
            choices=[
                '%d' % x for x in range(RFMOD_CHANNEL_MIN, RFMOD_CHANNEL_MAX)
            ])
        config.rfmod.finetune = ConfigSlider(default=5, limits=(1, 10))
        iRFmod = RFmod()

        def setFunction(configElement):
            iRFmod.setFunction(configElement.value)

        def setTestmode(configElement):
            iRFmod.setTestmode(configElement.value)

        def setSoundFunction(configElement):
            iRFmod.setSoundFunction(configElement.value)

        def setSoundCarrier(configElement):
            iRFmod.setSoundCarrier(configElement.index)

        def setChannel(configElement):
            iRFmod.setChannel(int(configElement.value))

        def setFinetune(configElement):
            iRFmod.setFinetune(configElement.value - 5)

        config.rfmod.enable.addNotifier(setFunction)
        config.rfmod.test.addNotifier(setTestmode)
        config.rfmod.sound.addNotifier(setSoundFunction)
        config.rfmod.soundcarrier.addNotifier(setSoundCarrier)
        config.rfmod.channel.addNotifier(setChannel)
        config.rfmod.finetune.addNotifier(setFinetune)
    else:
        config.rfmod.enable = ConfigNothing()
        config.rfmod.test = ConfigNothing()
        config.rfmod.sound = ConfigNothing()
        config.rfmod.soundcarrier = ConfigNothing()
        config.rfmod.channel = ConfigNothing()
        config.rfmod.finetune = ConfigNothing()
Пример #11
0
def InitLcd():
    detected = eDBoxLCD.getInstance().detected()
    SystemInfo["Display"] = detected
    config.lcd = ConfigSubsection()
    if detected:

        def setLCDbright(configElement):
            ilcd.setBright(configElement.value)

        def setLCDcontrast(configElement):
            ilcd.setContrast(configElement.value)

        def setLCDinverted(configElement):
            ilcd.setInverted(configElement.value)

        standby_default = 0

        ilcd = LCD()

        if not ilcd.isOled():
            config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
            config.lcd.contrast.addNotifier(setLCDcontrast)
        else:
            config.lcd.contrast = ConfigNothing()
            standby_default = 1

        config.lcd.standby = ConfigSlider(default=standby_default,
                                          limits=(0, 10))
        config.lcd.standby.addNotifier(setLCDbright)
        config.lcd.standby.apply = lambda: setLCDbright(config.lcd.standby)

        config.lcd.bright = ConfigSlider(default=5, limits=(0, 10))
        config.lcd.bright.addNotifier(setLCDbright)
        config.lcd.bright.apply = lambda: setLCDbright(config.lcd.bright)
        config.lcd.bright.callNotifiersOnSaveAndCancel = True

        config.lcd.invert = ConfigYesNo(default=False)
        config.lcd.invert.addNotifier(setLCDinverted)
    else:

        def doNothing():
            pass

        config.lcd.contrast = ConfigNothing()
        config.lcd.bright = ConfigNothing()
        config.lcd.standby = ConfigNothing()
        config.lcd.bright.apply = lambda: doNothing()
        config.lcd.standby.apply = lambda: doNothing()

    config.misc.standbyCounter.addNotifier(standbyCounterChanged,
                                           initial_call=False)
Пример #12
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 = ConfigSelectionNumber(min = 0, max = 120, stepwidth = 1, default = 3, wraparound = True)
	config.recording.margin_after = ConfigSelectionNumber(min = 0, max = 120, stepwidth = 1, default = 5, wraparound = True)
	config.recording.debug = ConfigYesNo(default = False)
	config.recording.ascii_filenames = ConfigYesNo(default = False)
	config.recording.keep_timers = ConfigSelectionNumber(min = 1, max = 120, stepwidth = 1, default = 7, wraparound = True)
	config.recording.filename_composition = ConfigSelection(default = "standard", choices = [
		("standard", _("standard")),
		("short", _("Short filenames")),
		("long", _("Long filenames")) ] )
	config.recording.offline_decode_delay = ConfigSelectionNumber(min = 1, max = 10000, stepwidth = 10, default = 1000, wraparound = True)
Пример #13
0
def InitSetupDevices():

    def keyboardNotifier(configElement):
        keyboard.activateKeyboardMap(configElement.index)

    config.keyboard = ConfigSubsection()
    config.keyboard.keymap = ConfigSelection(default=keyboard.getDefaultKeyboardMap(), choices=keyboard.getKeyboardMaplist())
    config.keyboard.keymap.addNotifier(keyboardNotifier)

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

    config.osd = ConfigSubsection()
    config.osd.language = ConfigText(default='es_ES')
    config.osd.language.addNotifier(languageNotifier)
    config.parental = ConfigSubsection()
    config.parental.lock = ConfigOnOff(default=False)
    config.parental.setuplock = ConfigOnOff(default=False)
    config.expert = ConfigSubsection()
    config.expert.satpos = ConfigOnOff(default=True)
    config.expert.fastzap = ConfigOnOff(default=True)
    config.expert.skipconfirm = ConfigOnOff(default=False)
    config.expert.hideerrors = ConfigOnOff(default=False)
    config.expert.autoinfo = ConfigOnOff(default=True)
Пример #14
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 = ConfigNumber(default=1000)
Пример #15
0
def InitInputDevices():
    config.inputDevices = ConfigSubsection()
    config.inputDevices.repeat = ConfigSlider(default=5, limits=(1, 10))
    config.inputDevices.delay = ConfigSlider(default=4, limits=(1, 10))

    #this instance anywhere else needed?
    iDevices = inputDevices()

    def inputDevicesRepeatChanged(configElement):
        iDevices.setRepeat(configElement.value)

    def inputDevicesDelayChanged(configElement):
        iDevices.setDelay(configElement.value)

    # this will call the "setup-val" initial
    config.inputDevices.repeat.addNotifier(inputDevicesRepeatChanged)
    config.inputDevices.delay.addNotifier(inputDevicesDelayChanged)
Пример #16
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 = ConfigSelectionNumber(min=0, max=120, stepwidth=1, default=3, wraparound=True)
	config.recording.instant_recording_length = ConfigSelection(default="paddedevent", choices=[("paddedevent", _("padded event")), ("5", _("5 minutes")), ("10", _("10 minutes")), ("15", _("15 minutes")), ("30", _("30 minutes")), ("60", _("60 minutes")), ("90", _("90 minutes")), ("120", _("120 minutes")), ("180", _("180 minutes"))])
	config.recording.margin_after = ConfigSelectionNumber(min=0, max=120, stepwidth=1, default=5, wraparound=True)
	config.recording.ascii_filenames = ConfigYesNo(default=False)
	config.recording.keep_timers = ConfigSelectionNumber(min=1, max=120, stepwidth=1, default=7, wraparound=True)
	config.recording.filename_composition = ConfigSelection(default="standard", choices=[
		("standard", _("standard")),
		("event", _("Event name first")),
		("name", _("Name and time")),
		("short", _("Short filenames")),
		("long", _("Long filenames"))
	])
	config.recording.offline_decode_delay = ConfigSelectionNumber(min=1, max=10000, stepwidth=10, default=1000, wraparound=True)
	config.recording.ecm_data = ConfigSelection(choices=[("normal", _("normal")), ("descrambled+ecm", _("descramble and record ecm")), ("scrambled+ecm", _("don't descramble, record ecm"))], default="normal")
Пример #17
0
 def __init__(self, session):
     global globalActionMap
     globalActionMap.actions['volumeUp'] = self.volUp
     globalActionMap.actions['volumeDown'] = self.volDown
     globalActionMap.actions['volumeMute'] = self.volMute
     VolumeControl.instance = self
     config.audio = ConfigSubsection()
     config.audio.volume = ConfigInteger(default=100, limits=(0, 100))
     self.volumeDialog = session.instantiateDialog(Volume)
     self.volumeDialog.setAnimationMode(0)
     self.muteDialog = session.instantiateDialog(Mute)
     self.muteDialog.setAnimationMode(0)
     self.hideVolTimer = eTimer()
     self.hideVolTimer.callback.append(self.volHide)
     vol = config.audio.volume.value
     self.volumeDialog.setValue(vol)
     self.volctrl = eDVBVolumecontrol.getInstance()
     self.volctrl.setVolume(vol, vol)
Пример #18
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 = ConfigSelectionNumber(min=0, max=120, stepwidth=1, default=3, wraparound=True)
	config.recording.margin_after = ConfigSelectionNumber(min=0, max=120, stepwidth=1, default=5, wraparound=True)
	config.recording.split_programme_minutes = ConfigSelectionNumber(min=0, max=30, stepwidth=1, default=15, wraparound=True)
	config.recording.ascii_filenames = ConfigYesNo(default=False)
	config.recording.keep_timers = ConfigSelectionNumber(min=1, max=120, stepwidth=1, default=7, wraparound=True)
	choicelist = [(0, _("Keep logs"))] + [(i, str(i)) for i in range(1, 14)]
	config.recording.keep_finished_timer_logs = ConfigSelection(default=0, choices=choicelist)
	config.recording.filename_composition = ConfigSelection(default="standard", choices=[
		("standard", _("Date first")),
		("event", _("Event name first")),
		("short", _("Short filenames")),
		("long", _("Long filenames"))])
	config.recording.offline_decode_delay = ConfigSelectionNumber(min=1, max=10000, stepwidth=10, default=1000, wraparound=True)
	config.recording.ecm_data = ConfigSelection(choices=[("normal", _("normal")), ("descrambled+ecm", _("descramble and record ecm")), ("scrambled+ecm", _("don't descramble, record ecm"))], default="normal")
Пример #19
0
def InitClientMode():
    config.clientmode = ConfigSubsection()
    config.clientmode.enabled = ConfigYesNo(default=False)

    def clientModeChanged(configElement):
        SystemInfo["ClientModeEnabled"] = configElement.value == True
        SystemInfo["ClientModeDisabled"] = configElement.value != True

    config.clientmode.enabled.addNotifier(clientModeChanged,
                                          immediate_feedback=True,
                                          initial_call=True)
    config.clientmode.serverAddressType = ConfigSelection(default="ip",
                                                          choices=[
                                                              ("ip", _("IP")),
                                                              ("domain",
                                                               _("Domain"))
                                                          ])
    config.clientmode.serverIP = ConfigIP(default=[0, 0, 0, 0], auto_jump=True)
    config.clientmode.serverDomain = ConfigText(default="", fixed_size=False)
    config.clientmode.serverStreamingPort = ConfigInteger(default=8001,
                                                          limits=(1, 65535))
    config.clientmode.serverFTPusername = ConfigText(default="root",
                                                     fixed_size=False)
    config.clientmode.serverFTPpassword = ConfigText(default="",
                                                     fixed_size=False)
    config.clientmode.serverFTPPort = ConfigInteger(default=21,
                                                    limits=(1, 65535))
    config.clientmode.passive = ConfigYesNo(False)
    config.clientmode.enableSchedule = ConfigYesNo(False)
    config.clientmode.scheduleRepeatInterval = ConfigSelection(
        default="360",
        choices=[("60", _("Every hour")), ("120", _("Every 2 hours")),
                 ("180", _("Every 3 hours")), ("360", _("Every 6 hours")),
                 ("720", _("Every 12 hours")), ("daily", _("Daily"))])
    config.clientmode.scheduletime = ConfigClock(default=0)  # 1:00
    # to reinstate normal mode settings
    config.clientmode.nim_cache = ConfigText(default="", fixed_size=False)
    config.clientmode.remote_fallback_enabled_cache = ConfigYesNo(
        default=False)
    config.clientmode.remote_fallback_cache = ConfigText(default="",
                                                         fixed_size=False)
    config.clientmode.timer_sanity_check_enabled_cache = ConfigYesNo(
        default=True)
Пример #20
0
def InitLcd():
	instance = eDBoxLCD.getInstance()
	if instance:
		detected = instance.detected()
	else:
		detected = False
	SystemInfo["Display"] = detected
	config.lcd = ConfigSubsection();
	if detected:
		def setLCDbright(configElement):
			ilcd.setBright(configElement.value);

		def setLCDinverted(configElement):
			ilcd.setInverted(configElement.value);

		standby_default = 0

		ilcd = LCD()

		config.lcd.contrast = ConfigNothing()
		if ilcd.isOled():
			standby_default = 1

		config.lcd.standby = ConfigSlider(default=standby_default, limits=(0, 10))
		config.lcd.standby.addNotifier(setLCDbright);
		config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)

		config.lcd.bright = ConfigSlider(default=SystemInfo["DefaultDisplayBrightness"], limits=(0, 10))
		config.lcd.bright.addNotifier(setLCDbright, call_on_save_or_cancel=True);
		config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)

		config.lcd.invert = ConfigYesNo(default=False)
		config.lcd.invert.addNotifier(setLCDinverted);
	else:
		def doNothing():
			pass
		config.lcd.contrast = ConfigNothing()
		config.lcd.bright = ConfigNothing()
		config.lcd.standby = ConfigNothing()
		config.lcd.bright.apply = lambda : doNothing()
		config.lcd.standby.apply = lambda : doNothing()

	config.misc.standbyCounter.addNotifier(standbyCounterChanged, initial_call = False)
Пример #21
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 = ConfigSelectionNumber(min = 0, max = 120, stepwidth = 1, default = 3, wraparound = True)
	config.recording.margin_after = ConfigSelectionNumber(min = 0, max = 120, stepwidth = 1, default = 5, wraparound = True)
	config.recording.ascii_filenames = ConfigYesNo(default = False)
	config.recording.keep_timers = ConfigSelectionNumber(min = 1, max = 120, stepwidth = 1, default = 7, wraparound = True)
	config.recording.filename_composition = ConfigSelection(default = "standard", choices = [
		("standard", _("standard")),
		("short", _("Short filenames")),
		("long", _("Long filenames")) ] )
	config.recording.offline_decode_delay = ConfigSelectionNumber(min = 1, max = 10000, stepwidth = 10, default = 1000, wraparound = True)
	config.recording.ecm_data = ConfigSelection(choices = [("normal", _("normal")), ("descrambled+ecm", _("descramble and record ecm")), ("scrambled+ecm", _("don't descramble, record ecm"))], default = "normal")
	config.recording.include_ait = ConfigYesNo(default = True)
	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 = "any")
	config.recording.warn_box_restart_rec_types    = ConfigSelection(choices = [("any", _("any recordings")), ("real", _("real recordings")), ("real_streaming", _("real recordings or streaming")), ("real_pseudo", _("real or pseudo recordings"))], default = "any")
	config.recording.ask_to_abort_pseudo_rec       = ConfigSelection(choices = [("ask", _("ask user")), ("abort_no_msg", _("just abort, no message")), ("abort_msg", _("just abort, show message")), ("never_abort", _("never abort"))], default = "never_abort")
	config.recording.ask_to_abort_streaming        = ConfigSelection(choices = [("ask", _("ask user")), ("abort_no_msg", _("just abort, no message")), ("abort_msg", _("just abort, show message")), ("never_abort", _("never abort"))], default = "never_abort")
	config.recording.ask_to_abort_pip              = ConfigSelection(choices = [("ask", _("ask user")), ("abort_no_msg", _("just abort, no message")), ("abort_msg", _("just abort, show message")), ("never_abort", _("never abort"))], default = "never_abort")
Пример #22
0
    def __init__(self, session):
        global globalActionMap
        globalActionMap.actions["volumeUp"] = self.volUp
        globalActionMap.actions["volumeDown"] = self.volDown
        globalActionMap.actions["volumeMute"] = self.volMute

        assert not VolumeControl.instance, "only one VolumeControl instance is allowed!"
        VolumeControl.instance = self

        config.audio = ConfigSubsection()
        config.audio.volume = ConfigInteger(default=50, limits=(0, 100))

        self.volumeDialog = session.instantiateDialog(Volume)
        self.muteDialog = session.instantiateDialog(Mute)

        self.hideVolTimer = eTimer()
        self.hideVolTimer.callback.append(self.volHide)

        vol = config.audio.volume.value
        self.volumeDialog.setValue(vol)
        self.volctrl = eDVBVolumecontrol.getInstance()
        self.volctrl.setVolume(vol, vol)
Пример #23
0
def InitHdmiRecord():
    full_hd = getMachineBuild() in (
        'et10000', 'dm900', 'dm920', 'et13000', 'sf5008', 'vuuno4kse',
        'vuduo4k') or getBoxType() in ('spycat4k', 'spycat4kcombo', 'gbquad4k')
    config.hdmirecord = ConfigSubsection()
    choices = [('512000', '0.5 Mb/s'), ('1024000', '1 Mb/s'),
               ('2048000', '2 Mb/s'), ('3072000', '3 Mb/s'),
               ('4096000', '4 Mb/s'), ('5120000', '5 Mb/s'),
               ('6144000', '6 Mb/s'), ('7168000', '7 Mb/s'),
               ('8192000', '8 Mb/s'), ('9216000', '9 Mb/s'),
               ('10240000', '10 Mb/s'), ('15360000', '15 Mb/s'),
               ('20480000', '20 Mb/s'), ('25600000', '25 Mb/s')]
    config.hdmirecord.bitrate = ConfigSelection(choices, default='5120000')
    choices = [('180', '180'), ('240', '240'), ('320', '320'), ('360', '360'),
               ('384', '384'), ('480', '480'), ('640', '640'), ('720', '720'),
               ('960', '960'), ('1280', '1280')]
    if full_hd:
        choices.append(('1920', '1920'))
    config.hdmirecord.width = ConfigSelection(choices, default='1280')
    choices = [('144', '144'), ('135', '135'), ('192', '192'), ('180', '180'),
               ('288', '288'), ('216', '216'), ('270', '270'), ('360', '360'),
               ('576', '576'), ('540', '540'), ('720', '720')]
    if full_hd:
        choices.append(('1080', '1080'))
    config.hdmirecord.height = ConfigSelection(choices, default='720')
    config.hdmirecord.framerate = ConfigSelection(choices=[('24000', '24'),
                                                           ('25000', '25'),
                                                           ('30000', '30'),
                                                           ('50000', '50'),
                                                           ('60000', '60')],
                                                  default='60000')
    config.hdmirecord.interlaced = ConfigSelection(choices=[('0', _('No')),
                                                            ('1', _('Yes'))],
                                                   default='0')
    config.hdmirecord.aspectratio = ConfigSelection(choices=[('0', 'Auto'),
                                                             ('1', '4:3'),
                                                             ('2', '16:9')],
                                                    default='0')
Пример #24
0
    def __init__(self):
        config.hdmicec = ConfigSubsection()
        config.hdmicec.enabled = ConfigYesNo(default=True)
        config.hdmicec.active_source_reply = ConfigYesNo(default=True)
        config.hdmicec.standby_message = ConfigSelection(
            choices={
                "inactive,standby": _("TV standby"),
                "inactive": _("Source inactive"),
                "nothing": _("Nothing"),
            },
            default="inactive,standby")
        config.hdmicec.wakeup_message = ConfigSelection(
            choices={
                "wakeup,active": _("TV wakeup"),
                "active": _("Source active"),
                "nothing": _("Nothing"),
            },
            default="wakeup,active")

        eHdmiCEC.getInstance().messageReceived.get().append(
            self.messageReceived)
        config.misc.standbyCounter.addNotifier(self.enterStandby,
                                               initial_call=False)
Пример #25
0
    def __init__(self, session):
        self.session = session

        global globalActionMap
        globalActionMap.actions["volumeUp"] = self.volUp
        globalActionMap.actions["volumeDown"] = self.volDown
        globalActionMap.actions["volumeMute"] = self.volMute

        assert not VolumeControl.instance, "only one VolumeControl instance is allowed!"
        VolumeControl.instance = self
        skin.addOnLoadCallback(self.skinChanged)

        config.audio = ConfigSubsection()
        config.audio.volume = ConfigInteger(default=100, limits=(0, 100))

        vol = config.audio.volume.value
        self.volctrl = eDVBVolumecontrol.getInstance()
        self.volctrl.setVolume(vol, vol)

        self.openDialogs()

        self.hideVolTimer = eTimer()
        self.hideVolTimer.callback.append(self.volHide)
Пример #26
0
	def __init__(self, session):
		globalActionMap.actions["volumeUp"]=self.volUp
		globalActionMap.actions["volumeDown"]=self.volDown
		globalActionMap.actions["volumeMute"]=self.volMute

		assert not VolumeControl.instance, "only one VolumeControl instance is allowed!"
		VolumeControl.instance = self

		config.audio = ConfigSubsection()
		config.audio.volume = ConfigInteger(default = 100, limits = (0, 100))
		config.audio.volume_stepsize = ConfigInteger(default=5, limits=(1,10))

		self.volumeDialog = session.instantiateDialog(Volume,zPosition=10000)
		self.volumeDialog.neverAnimate()
		self.muteDialog = session.instantiateDialog(Mute,zPosition=10000)
		self.muteDialog.neverAnimate()

		self.hideVolTimer = eTimer()
		self.hideVolTimer_conn = self.hideVolTimer.timeout.connect(self.volHide)

		vol = config.audio.volume.value
		self.volumeDialog.setValue(vol)
		self.volctrl = eDVBVolumecontrol.getInstance()
		self.volctrl.setVolume(vol, vol)
Пример #27
0
def InitLcd():
    if getBoxType() in ('gb800se', 'gb800solo', 'iqonios300hd', 'tmsingle',
                        'tmnano2super', 'vusolo', 'vusolose', 'et4x00',
                        'et5x00', 'et6x00'):
        detected = False
    else:
        detected = eDBoxLCD.getInstance().detected()

    ilcd = LCD()

    SystemInfo["Display"] = detected
    config.lcd = ConfigSubsection()

    if SystemInfo["StandbyLED"]:

        def setLEDstandby(configElement):
            ilcd.setLEDStandby(configElement.value)

        config.usage.standbyLED = ConfigYesNo(default=True)
        config.usage.standbyLED.addNotifier(setLEDstandby)

    if SystemInfo["LEDButtons"]:

        def setLEDnormalstate(configElement):
            ilcd.setLEDNormalState(configElement.value)

        def setLEDdeepstandby(configElement):
            ilcd.setLEDDeepStandbyState(configElement.value)

        def setLEDblinkingtime(configElement):
            ilcd.setLEDBlinkingTime(configElement.value)

        config.lcd.ledblinkingtime = ConfigSlider(default=5,
                                                  increment=1,
                                                  limits=(0, 15))
        config.lcd.ledblinkingtime.addNotifier(setLEDblinkingtime)
        config.lcd.ledbrightnessdeepstandby = ConfigSlider(default=1,
                                                           increment=1,
                                                           limits=(0, 15))
        config.lcd.ledbrightnessdeepstandby.addNotifier(setLEDnormalstate)
        config.lcd.ledbrightnessdeepstandby.addNotifier(setLEDdeepstandby)
        config.lcd.ledbrightnessdeepstandby.apply = lambda: setLEDdeepstandby(
            config.lcd.ledbrightnessdeepstandby)
        config.lcd.ledbrightnessstandby = ConfigSlider(default=1,
                                                       increment=1,
                                                       limits=(0, 15))
        config.lcd.ledbrightnessstandby.addNotifier(setLEDnormalstate)
        config.lcd.ledbrightnessstandby.apply = lambda: setLEDnormalstate(
            config.lcd.ledbrightnessstandby)
        config.lcd.ledbrightness = ConfigSlider(default=3,
                                                increment=1,
                                                limits=(0, 15))
        config.lcd.ledbrightness.addNotifier(setLEDnormalstate)
        config.lcd.ledbrightness.apply = lambda: setLEDnormalstate(
            config.lcd.ledbrightness)
        config.lcd.ledbrightness.callNotifiersOnSaveAndCancel = True

    if detected:
        config.lcd.scroll_speed = ConfigSelection(default="300",
                                                  choices=[("500", _("slow")),
                                                           ("300",
                                                            _("normal")),
                                                           ("100", _("fast"))])
        config.lcd.scroll_delay = ConfigSelection(
            default="10000",
            choices=[("10000", "10 " + _("seconds")),
                     ("20000", "20 " + _("seconds")),
                     ("30000", "30 " + _("seconds")),
                     ("60000", "1 " + _("minute")),
                     ("300000", "5 " + _("minutes")),
                     ("noscrolling", _("off"))])

        def setLCDbright(configElement):
            ilcd.setBright(configElement.value)

        def setLCDcontrast(configElement):
            ilcd.setContrast(configElement.value)

        def setLCDinverted(configElement):
            ilcd.setInverted(configElement.value)

        def setLCDflipped(configElement):
            ilcd.setFlipped(configElement.value)

        def setLCDmode(configElement):
            ilcd.setMode(configElement.value)

        def setLCDrepeat(configElement):
            ilcd.setRepeat(configElement.value)

        def setLCDscrollspeed(configElement):
            ilcd.setScrollspeed(configElement.value)

        def setLCDminitvmode(configElement):
            ilcd.setLCDMiniTVMode(configElement.value)

        def setLCDminitvpipmode(configElement):
            ilcd.setLCDMiniTVPIPMode(configElement.value)

        def setLCDminitvfps(configElement):
            ilcd.setLCDMiniTVFPS(configElement.value)

        standby_default = 0

        if not ilcd.isOled():
            config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
            config.lcd.contrast.addNotifier(setLCDcontrast)
        else:
            config.lcd.contrast = ConfigNothing()
            standby_default = 1

        config.lcd.standby = ConfigSlider(default=standby_default,
                                          limits=(0, 10))
        config.lcd.bright = ConfigSlider(default=10, limits=(0, 10))
        config.lcd.standby.addNotifier(setLCDbright)
        config.lcd.standby.apply = lambda: setLCDbright(config.lcd.standby)

        config.lcd.bright = ConfigSlider(default=5, limits=(0, 10))
        config.lcd.bright.addNotifier(setLCDbright)
        config.lcd.bright.apply = lambda: setLCDbright(config.lcd.bright)
        config.lcd.bright.callNotifiersOnSaveAndCancel = True

        config.lcd.invert = ConfigYesNo(default=False)
        config.lcd.invert.addNotifier(setLCDinverted)

        config.lcd.flip = ConfigYesNo(default=False)
        config.lcd.flip.addNotifier(setLCDflipped)

        if SystemInfo["LCDMiniTV"]:
            config.lcd.minitvmode = ConfigSelection(
                [("0", _("normal")), ("1", _("MiniTV")), ("2", _("OSD")),
                 ("3", _("MiniTV with OSD"))], "0")
            config.lcd.minitvmode.addNotifier(setLCDminitvmode)
            config.lcd.minitvpipmode = ConfigSelection(
                [("0", _("off")), ("5", _("PIP")),
                 ("7", _("PIP with OSD"))], "0")
            config.lcd.minitvpipmode.addNotifier(setLCDminitvpipmode)
            config.lcd.minitvfps = ConfigSlider(default=30, limits=(0, 30))
            config.lcd.minitvfps.addNotifier(setLCDminitvfps)

        if fileExists("/proc/stb/lcd/scroll_delay"):
            config.lcd.scrollspeed = ConfigSlider(default=150,
                                                  increment=10,
                                                  limits=(0, 500))
            config.lcd.scrollspeed.addNotifier(setLCDscrollspeed)
            config.lcd.repeat = ConfigSelection([("0", _("None")),
                                                 ("1", _("1X")),
                                                 ("2", _("2X")),
                                                 ("3", _("3X")),
                                                 ("4", _("4X")),
                                                 ("500", _("Continues"))], "3")
            config.lcd.repeat.addNotifier(setLCDrepeat)
            config.lcd.mode = ConfigSelection([("0", _("No")),
                                               ("1", _("Yes"))], "1")
            config.lcd.mode.addNotifier(setLCDmode)
        else:
            config.lcd.mode = ConfigNothing()
            config.lcd.repeat = ConfigNothing()
            config.lcd.scrollspeed = ConfigNothing()

    else:

        def doNothing():
            pass

        config.lcd.contrast = ConfigNothing()
        config.lcd.bright = ConfigNothing()
        config.lcd.standby = ConfigNothing()
        config.lcd.bright.apply = lambda: doNothing()
        config.lcd.standby.apply = lambda: doNothing()
        config.lcd.mode = ConfigNothing()
        config.lcd.repeat = ConfigNothing()
        config.lcd.scrollspeed = ConfigNothing()
        config.lcd.ledbrightness = ConfigNothing()
        config.lcd.ledbrightness.apply = lambda: doNothing()
        config.lcd.ledbrightnessstandby = ConfigNothing()
        config.lcd.ledbrightnessstandby.apply = lambda: doNothing()
        config.lcd.ledbrightnessdeepstandby = ConfigNothing()
        config.lcd.ledbrightnessdeepstandby.apply = lambda: doNothing()
        config.lcd.ledblinkingtime = ConfigNothing()

    config.misc.standbyCounter.addNotifier(standbyCounterChanged,
                                           initial_call=False)
Пример #28
0
def InitLcd():
	detected = eDBoxLCD.getInstance() and eDBoxLCD.getInstance().detected()
	config.lcd = ConfigSubsection();
	if detected:
		config.lcd.scroll_speed = ConfigSelection(default = "300", choices = [
			("500", _("slow")),
			("300", _("normal")),
			("100", _("fast"))])
		config.lcd.scroll_delay = ConfigSelection(default = "10000", choices = [
			("10000", "10 " + _("seconds")),
			("20000", "20 " + _("seconds")),
			("30000", "30 " + _("seconds")),
			("60000", "1 " + _("minute")),
			("300000", "5 " + _("minutes")),
			("noscrolling", _("off"))])
	
		def setLCDbright(configElement):
			ilcd.setBright(configElement.value)

		def setLCDcontrast(configElement):
			ilcd.setContrast(configElement.value)

		def setLCDinverted(configElement):
			ilcd.setInverted(configElement.value)

		def setLCDflipped(configElement):
			ilcd.setFlipped(configElement.value)

		def setLCDmode(configElement):
			ilcd.setMode(configElement.value)

		def setLCDpower(configElement):
			ilcd.setPower(configElement.value);
			
		def setLCD8500(configElement):
			ilcd.setEt8500(configElement.value);

		def setLCDrepeat(configElement):
			ilcd.setRepeat(configElement.value)

		def setLCDscrollspeed(configElement):
			ilcd.setScrollspeed(configElement.value)

		def setLEDnormalstate(configElement):
			ilcd.setLEDNormalState(configElement.value)

		def setLEDdeepstandby(configElement):
			ilcd.setLEDDeepStandbyState(configElement.value)

		def setLEDblinkingtime(configElement):
			ilcd.setLEDBlinkingTime(configElement.value)

		def setLedPowerColor(configElement):
			f = open("/proc/stb/fp/ledpowercolor", "w")
			f.write(configElement.value)
			f.close()

		def setLedStandbyColor(configElement):
			f = open("/proc/stb/fp/ledstandbycolor", "w")
			f.write(configElement.value)
			f.close()

		def setLedSuspendColor(configElement):
			f = open("/proc/stb/fp/ledsuspendledcolor", "w")
			f.write(configElement.value)
			f.close()

		def setPower4x7On(configElement):
			f = open("/proc/stb/fp/power4x7on", "w")
			f.write(configElement.value)
			f.close()

		def setPower4x7Standby(configElement):
			f = open("/proc/stb/fp/power4x7standby", "w")
			f.write(configElement.value)
			f.close()

		def setPower4x7Suspend(configElement):
			f = open("/proc/stb/fp/power4x7suspend", "w")
			f.write(configElement.value)
			f.close()

		standby_default = 5

		ilcd = LCD()

		if not ilcd.isOled():
			config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
			config.lcd.contrast.addNotifier(setLCDcontrast)
		else:
			config.lcd.contrast = ConfigNothing()
			standby_default = 1

		config.lcd.standby = ConfigSlider(default=standby_default, limits=(0, 10))
		config.lcd.standby.addNotifier(setLCDbright)
		config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)

		config.lcd.bright = ConfigSlider(default=5, limits=(0, 10))
		config.lcd.bright.addNotifier(setLCDbright)
		config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
		config.lcd.bright.callNotifiersOnSaveAndCancel = True

		config.lcd.invert = ConfigYesNo(default=False)
		config.lcd.invert.addNotifier(setLCDinverted)

		config.lcd.flip = ConfigYesNo(default=False)
		config.lcd.flip.addNotifier(setLCDflipped)

		if fileExists("/proc/stb/fp/ledpowercolor"):
			config.lcd.ledpowercolor = ConfigSelection(default = "1", choices = [("0", _("off")),("1", _("blue")), ("2", _("red")), ("3", _("violet"))])
			config.lcd.ledpowercolor.addNotifier(setLedPowerColor)

		if fileExists("/proc/stb/fp/ledstandbycolor"):
			config.lcd.ledstandbycolor = ConfigSelection(default = "3", choices = [("0", _("off")),("1", _("blue")), ("2", _("red")), ("3", _("violet"))])
			config.lcd.ledstandbycolor.addNotifier(setLedStandbyColor)

		if fileExists("/proc/stb/fp/ledsuspendledcolor"):
			config.lcd.ledsuspendcolor = ConfigSelection(default = "2", choices = [("0", _("off")),("1", _("blue")), ("2", _("red")), ("3", _("violet"))])
			config.lcd.ledsuspendcolor.addNotifier(setLedSuspendColor)

		if fileExists("/proc/stb/fp/power4x7on"):
			config.lcd.power4x7on = ConfigSelection(default = "on", choices = [("off", _("Off")), ("on", _("On"))])
			config.lcd.power4x7on.addNotifier(setPower4x7On)

		if fileExists("/proc/stb/fp/power4x7standby"):
			config.lcd.power4x7standby = ConfigSelection(default = "on", choices = [("off", _("Off")), ("on", _("On"))])
			config.lcd.power4x7standby.addNotifier(setPower4x7Standby)

		if fileExists("/proc/stb/fp/power4x7suspend"):
			config.lcd.power4x7suspend = ConfigSelection(default = "on", choices = [("off", _("Off")), ("on", _("On"))])
			config.lcd.power4x7suspend.addNotifier(setPower4x7Suspend)

		if fileExists("/proc/stb/lcd/scroll_delay"):
			config.lcd.scrollspeed = ConfigSlider(default = 150, increment = 10, limits = (0, 500))
			config.lcd.scrollspeed.addNotifier(setLCDscrollspeed)
			config.lcd.repeat = ConfigSelection([("0", _("None")), ("1", _("1X")), ("2", _("2X")), ("3", _("3X")), ("4", _("4X")), ("500", _("Continues"))], "3")
			config.lcd.repeat.addNotifier(setLCDrepeat)
			config.lcd.mode = ConfigSelection([("0", _("No")), ("1", _("Yes"))], "1")
			config.lcd.mode.addNotifier(setLCDmode)
		else:
			config.lcd.mode = ConfigNothing()
			config.lcd.repeat = ConfigNothing()
			config.lcd.scrollspeed = ConfigNothing()

		if fileExists("/proc/stb/power/vfd"):
			config.lcd.power = ConfigSelection([("0", _("Off")), ("1", _("On"))], "1")
			config.lcd.power.addNotifier(setLCDpower);
		else:
			config.lcd.power = ConfigNothing()
			
		if fileExists("/proc/stb/fb/sd_detach"):
			config.lcd.et8500 = ConfigSelection([("1", _("No")), ("0", _("Yes"))], "0")
			config.lcd.et8500.addNotifier(setLCD8500);
		else:
			config.lcd.et8500 = ConfigNothing()

		if getBoxType() == 'vuultimo':
			config.lcd.ledblinkingtime = ConfigSlider(default = 5, increment = 1, limits = (0,15))
			config.lcd.ledblinkingtime.addNotifier(setLEDblinkingtime)
			config.lcd.ledbrightnessdeepstandby = ConfigSlider(default = 1, increment = 1, limits = (0,15))
			config.lcd.ledbrightnessdeepstandby.addNotifier(setLEDnormalstate)
			config.lcd.ledbrightnessdeepstandby.addNotifier(setLEDdeepstandby)
			config.lcd.ledbrightnessdeepstandby.apply = lambda : setLEDdeepstandby(config.lcd.ledbrightnessdeepstandby)
			config.lcd.ledbrightnessstandby = ConfigSlider(default = 1, increment = 1, limits = (0,15))
			config.lcd.ledbrightnessstandby.addNotifier(setLEDnormalstate)
			config.lcd.ledbrightnessstandby.apply = lambda : setLEDnormalstate(config.lcd.ledbrightnessstandby)
			config.lcd.ledbrightness = ConfigSlider(default = 3, increment = 1, limits = (0,15))
			config.lcd.ledbrightness.addNotifier(setLEDnormalstate)
			config.lcd.ledbrightness.apply = lambda : setLEDnormalstate(config.lcd.ledbrightness)
			config.lcd.ledbrightness.callNotifiersOnSaveAndCancel = True
		else:
			def doNothing():
				pass
			config.lcd.ledbrightness = ConfigNothing()
			config.lcd.ledbrightness.apply = lambda : doNothing()
			config.lcd.ledbrightnessstandby = ConfigNothing()
			config.lcd.ledbrightnessstandby.apply = lambda : doNothing()
			config.lcd.ledbrightnessdeepstandby = ConfigNothing()
			config.lcd.ledbrightnessdeepstandby.apply = lambda : doNothing()
			config.lcd.ledblinkingtime = ConfigNothing()
	else:
		def doNothing():
			pass
		config.lcd.contrast = ConfigNothing()
		config.lcd.bright = ConfigNothing()
		config.lcd.standby = ConfigNothing()
		config.lcd.bright.apply = lambda : doNothing()
		config.lcd.standby.apply = lambda : doNothing()
		config.lcd.mode = ConfigNothing()
		config.lcd.power = ConfigNothing()
		config.lcd.et8500 = ConfigNothing()
		config.lcd.repeat = ConfigNothing()
		config.lcd.scrollspeed = ConfigNothing()
		config.lcd.ledbrightness = ConfigNothing()
		config.lcd.ledbrightness.apply = lambda : doNothing()
		config.lcd.ledbrightnessstandby = ConfigNothing()
		config.lcd.ledbrightnessstandby.apply = lambda : doNothing()
		config.lcd.ledbrightnessdeepstandby = ConfigNothing()
		config.lcd.ledbrightnessdeepstandby.apply = lambda : doNothing()
		config.lcd.ledblinkingtime = ConfigNothing()

	config.misc.standbyCounter.addNotifier(standbyCounterChanged, initial_call = False)
Пример #29
0
def InitLcd():
    detected = eDBoxLCD.getInstance().detected()
    SystemInfo["Display"] = detected
    config.lcd = ConfigSubsection()
    if detected:

        def setLCDbright(configElement):
            ilcd.setBright(configElement.value)

        def setLCDcontrast(configElement):
            ilcd.setContrast(configElement.value)

        def setLCDinverted(configElement):
            ilcd.setInverted(configElement.value)

        def setLCDflipped(configElement):
            ilcd.setFlipped(configElement.value)

        standby_default = 0

        ilcd = LCD()

        if not ilcd.isOled():
            config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
            config.lcd.contrast.addNotifier(setLCDcontrast)
        else:
            config.lcd.contrast = ConfigNothing()
            standby_default = 1

        config.lcd.standby = ConfigSlider(default=standby_default,
                                          limits=(0, 10))
        config.lcd.standby.addNotifier(setLCDbright)
        config.lcd.standby.apply = lambda: setLCDbright(config.lcd.standby)

        config.lcd.bright = ConfigSlider(default=5, limits=(0, 10))
        config.lcd.bright.addNotifier(setLCDbright)
        config.lcd.bright.apply = lambda: setLCDbright(config.lcd.bright)
        config.lcd.bright.callNotifiersOnSaveAndCancel = True

        config.lcd.invert = ConfigYesNo(default=False)
        config.lcd.invert.addNotifier(setLCDinverted)

        config.lcd.flip = ConfigYesNo(default=False)
        config.lcd.flip.addNotifier(setLCDflipped)

        if SystemInfo["LcdLiveTV"]:

            def lcdLiveTvChanged(configElement):
                open(SystemInfo["LcdLiveTV"],
                     "w").write(configElement.value and "0" or "1")
                InfoBarInstance = InfoBar.instance
                InfoBarInstance and InfoBarInstance.session.open(dummyScreen)

            config.lcd.showTv = ConfigYesNo(default=False)
            config.lcd.showTv.addNotifier(lcdLiveTvChanged)
    else:

        def doNothing():
            pass

        config.lcd.contrast = ConfigNothing()
        config.lcd.bright = ConfigNothing()
        config.lcd.standby = ConfigNothing()
        config.lcd.bright.apply = lambda: doNothing()
        config.lcd.standby.apply = lambda: doNothing()

    config.misc.standbyCounter.addNotifier(standbyCounterChanged,
                                           initial_call=False)
Пример #30
0
        exec(cmd)
        cmd = "config.inputDevices." + device + ".name.addNotifier(self.inputDevicesNameChanged,config.inputDevices." + device + ".name)"
        exec(cmd)
        cmd = "config.inputDevices." + device + ".repeat = ConfigSlider(default=100, increment = 10, limits=(0, 500))"
        exec(cmd)
        cmd = "config.inputDevices." + device + ".repeat.addNotifier(self.inputDevicesRepeatChanged,config.inputDevices." + device + ".repeat)"
        exec(cmd)
        cmd = "config.inputDevices." + device + ".delay = ConfigSlider(default=700, increment = 100, limits=(0, 5000))"
        exec(cmd)
        cmd = "config.inputDevices." + device + ".delay.addNotifier(self.inputDevicesDelayChanged,config.inputDevices." + device + ".delay)"
        exec(cmd)


iInputDevices = inputDevices()

config.plugins.remotecontroltype = ConfigSubsection()
config.plugins.remotecontroltype.rctype = ConfigInteger(default=0)


class RcTypeControl():
    def __init__(self):
        self.boxType = ""
        if SystemInfo["RcTypeChangable"] and os.path.exists(
                '/proc/stb/info/boxtype'):
            self.isSupported = True
            self.boxType = open('/proc/stb/info/boxtype', 'r').read().strip()
            if config.plugins.remotecontroltype.rctype.value != 0:
                self.writeRcType(config.plugins.remotecontroltype.rctype.value)
        else:
            self.isSupported = False