コード例 #1
0
ファイル: LcdPicon.py プロジェクト: TwolDE2/ATV65
 def __init__(self):
     Renderer.__init__(self)
     self.PicLoad = ePicLoad()
     self.PicLoad.PictureData.get().append(self.updatePicon)
     self.piconsize = (0, 0)
     self.pngname = ""
     self.lastPath = None
     if getDisplayType() in ('bwlcd255',
                             'bwlcd140') and not BoxInfo.getItem("grautec"):
         pngname = findLcdPicon("lcd_picon_default")
     else:
         pngname = findLcdPicon("picon_default")
     self.defaultpngname = None
     if not pngname:
         if getDisplayType() in (
                 'bwlcd255', 'bwlcd140') and not BoxInfo.getItem("grautec"):
             tmp = resolveFilename(SCOPE_GUISKIN, "lcd_picon_default.png")
         else:
             tmp = resolveFilename(SCOPE_GUISKIN, "picon_default.png")
         if pathExists(tmp):
             pngname = tmp
         else:
             if getDisplayType() in ('bwlcd255', 'bwlcd140'
                                     ) and not BoxInfo.getItem("grautec"):
                 pngname = resolveFilename(SCOPE_GUISKIN,
                                           "lcd_picon_default.png")
             else:
                 pngname = resolveFilename(SCOPE_GUISKIN,
                                           "picon_default.png")
     if os.path.getsize(pngname):
         self.defaultpngname = pngname
コード例 #2
0
ファイル: QuickMenu.py プロジェクト: TwolDE2/ATV65
 def Qsoftcam(self):
     self.sublist = []
     if BoxInfo.getItem(
             "SoftCam"):  # show only when there is a softcam installed
         self.sublist.append(
             QuickSubMenuEntryComponent(
                 "Softcam Settings", _("Control your Softcams"),
                 _("Use the Softcam Panel to control your Cam. This let you start/stop/select a cam"
                   )))
         if BoxInfo.getItem(
                 "ShowOscamInfo"):  # show only when oscam or ncam is active
             self.sublist.append(
                 QuickSubMenuEntryComponent("OScam Information",
                                            _("Show OScam Info"),
                                            _("Show the OScamInfo Screen")))
         if BoxInfo.getItem(
                 "ShowCCCamInfo"):  # show only when CCcam is active
             self.sublist.append(
                 QuickSubMenuEntryComponent(
                     "CCcam Information", _("Show CCcam Info"),
                     _("Show the CCcam Info Screen")))
     self.sublist.append(
         QuickSubMenuEntryComponent(
             "Download Softcams", _("Download and install cam"),
             _("Shows available softcams. Here you can download and install them"
               )))
     self["sublist"].l.setList(self.sublist)
コード例 #3
0
ファイル: Ci.py プロジェクト: wedebe/enigma2
    def createSetup(self):
        level = config.usage.setup_level.index

        self.list = []

        if level >= 1:
            if BoxInfo.getItem("CommonInterfaceCIDelay"):
                self.list.append(
                    getConfigListEntry(
                        _("DVB CI Delay"), config.cimisc.dvbCiDelay,
                        _("Choose dvb wait delay for ci response.")))
            if BoxInfo.getItem("HaveCISSL"):
                self.list.append(
                    getConfigListEntry(
                        _("CI Operation Mode"), config.cimisc.civersion,
                        _("Choose the CI protocol operation mode for standard ci or ciplus."
                          )))
            else:
                self.list.append(
                    getConfigListEntry(
                        _("CI Operation Mode"), config.cimisc.civersion,
                        _("Your Hardware can detect ci mode self or work only in legacy mode."
                          )))

        self["config"].list = self.list
        self["config"].l.setList(self.list)
        if config.usage.sort_settings.value:
            self["config"].list.sort()
コード例 #4
0
ファイル: Ci.py プロジェクト: catalinii/enigma2
	def updateEntries(self):
		self.list = []
		self.entryData = []
		for slot in self.slots:
			self.addToList(getConfigListEntry(_("CI %s enabled" % slot), config.ci[slot].enabled), -1, slot)
			if self.state[slot] == 3:  # module disabled by the user
				continue
			self.addToList((_("Reset"), ConfigNothing()), 0, slot)
			self.addToList((_("Init"), ConfigNothing()), 1, slot)

			if self.state[slot] == 0:                       #no module
				self.addToList((_("no module found"), ConfigNothing()), 2, slot)
			elif self.state[slot] == 1:             #module in init
				self.addToList((_("init module"), ConfigNothing()), 2, slot)
			elif self.state[slot] == 2:             #module ready
				#get appname
				appname = eDVBCI_UI.getInstance().getAppName(slot)
				self.addToList((appname, ConfigNothing()), 2, slot)

			self.addToList(getConfigListEntry(_("Set pin code persistent"), config.ci[slot].use_static_pin), -1, slot)
			self.addToList((_("Enter persistent PIN code"), ConfigNothing()), 5, slot)
			self.addToList((_("Reset persistent PIN code"), ConfigNothing()), 6, slot)
			self.addToList(getConfigListEntry(_("Show CI messages"), config.ci[slot].show_ci_messages), -1, slot)
			self.addToList(getConfigListEntry(_("Multiple service support"), config.ci[slot].canDescrambleMultipleServices), -1, slot)

			if BoxInfo.getItem("CommonInterfaceSupportsHighBitrates"):
				self.addToList(self.HighBitrateEntry[slot], -1, slot)
			if BoxInfo.getItem("RelevantPidsRoutingSupport"):
				self.addToList(self.RelevantPidsRoutingEntry[slot], -1, slot)

		self["entries"].list = self.list
		self["entries"].l.setList(self.list)
		if self.selectionChanged not in self["entries"].onSelectionChanged:
			self["entries"].onSelectionChanged.append(self.selectionChanged)
コード例 #5
0
 def final_scroll_delay(configElement):
     if BoxInfo.getItem("VFDDelay"):
         fileWriteLine(BoxInfo.getItem("VFD_final_scroll_delay"),
                       hex(int(configElement.value)))
     else:
         fileWriteLine(BoxInfo.getItem("VFD_final_scroll_delay"),
                       configElement.value)
コード例 #6
0
ファイル: qpip.py プロジェクト: TwolDE2/ATV65
    def layoutFinishedCB(self):
        if not os.access(ENABLE_QPIP_PROCPATH, os.F_OK):
            self.notSupportTimer.start(100, True)
            return

        self.onClose.append(self.__onClose)

        if self.session.pipshown:  # try to disable pip
            self.session.pipshown = False
            del self.session.pip

        self.oldService = self.session.nav.getCurrentlyPlayingServiceReference(
        )
        self.session.nav.stopService()

        if BoxInfo.getItem("FastChannelChange", False):
            self.disableFCC()

        if BoxInfo.getItem("MiniTV", False):
            self.disableMiniTV()

        ret = setDecoderMode("mosaic")
        if ret is not True:
            self.forceToExitTimer.start(0, True)
            return

        self.moveLabel()

        if self.qpipChannelList.length() == 0:
            self.noChannelTimer.start(10, True)
        else:
            self.playLastChannel()
コード例 #7
0
def getProcPartitions(partitionList):
	partitions = []
	with open("/proc/partitions", "r") as fd:
		for line in fd.readlines():
			line = line.strip()
			if line == "":  # Skip empty lines.
				continue
			(devmajor, devminor, blocks, device) = line.split()
			if devmajor == "major":  # Skip label line.
				continue
			# print "[MountManager] device='%s', devmajor='%s', devminor='%s'." % (device, devmajor, devminor)
			devMajor = int(devmajor)
			if devMajor in blacklistedDisks:  # Ignore all blacklisted devices.
				continue
			if devMajor == 179:
				if not BoxInfo.getItem("HasSDnomount"):  # Only interested in h9/i55/h9combo(+dups) mmc partitions.  h9combo(+dups) uses mmcblk1p[0-3].
					continue
				if BoxInfo.getItem("HasH9SD"):
					if not re.search("mmcblk0p1", device):  # h9/i55 only mmcblk0p1 mmc partition
						continue
					if BoxInfo.getItem("HasMMC"):  # With h9/i55 reject mmcblk0p1 mmc partition if root device.
						continue
				if BoxInfo.getItem("HasSDnomount")[0] and not re.search("mmcblk1p[0-3]", device):  # h9combo(+dups) uses mmcblk1p[0-3] include
					continue
			if devMajor == 8:
				if not re.search("sd[a-z][1-9]", device):  # If storage use partitions only.
					continue
				if BoxInfo.getItem("HiSilicon") and path.exists("/dev/sda4") and re.search("sd[a][1-4]", device):  # Sf8008 using SDcard for slots ---> exclude
					continue
			if device in partitions:  # If device is already in partition list ignore it.
				continue
			buildPartitionInfo(device, partitionList)
			partitions.append(device)
コード例 #8
0
    def __init__(self, session):
        global pip_config_initialized
        Screen.__init__(self, session)
        self["video"] = VideoWindow()
        self.pipActive = session.instantiateDialog(PictureInPictureZapping)
        self.dishpipActive = session.instantiateDialog(Dishpip)
        self.currentService = None
        self.currentServiceReference = None

        self.choicelist = [("standard", _("Standard"))]
        if BoxInfo.getItem("VideoDestinationConfigurable"):
            self.choicelist.append(("cascade", _("Cascade PiP")))
            self.choicelist.append(("split", _("Splitscreen")))
            self.choicelist.append(("byside", _("Side by side")))
        self.choicelist.append(("bigpig", _("Big PiP")))
        if BoxInfo.getItem("HasExternalPIP"):
            self.choicelist.append(("external", _("External PiP")))

        if not pip_config_initialized:
            config.av.pip = ConfigPosition(default=[510, 28, 180, 135],
                                           args=(MAX_X, MAX_Y, MAX_X, MAX_Y))
            config.av.pip_mode = ConfigSelection(default="standard",
                                                 choices=self.choicelist)
            pip_config_initialized = True

        self.onLayoutFinish.append(self.LayoutFinished)
コード例 #9
0
ファイル: VolumeControl.py プロジェクト: wedebe/enigma2
    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)
        if BoxInfo.getItem("OSDAnimation"):
            self.volumeDialog.setAnimationMode(0)
        self.muteDialog = session.instantiateDialog(Mute)
        if BoxInfo.getItem("OSDAnimation"):
            self.muteDialog.setAnimationMode(0)

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

        self.stepVolTimer = eTimer()
        self.repeat = 500
        self.delay = 3000

        vol = config.audio.volume.value
        self.volumeDialog.setValue(vol)
        self.volctrl = eDVBVolumecontrol.getInstance()
        self.volctrl.setVolume(vol, vol)
        self.last_vol = vol
コード例 #10
0
ファイル: InputDevice.py プロジェクト: wedebe/enigma2
	def __init__(self):
		self.model = BoxInfo.getItem("model")
		self.rcName = BoxInfo.getItem("rcname")
		self.rcType = self.readRemoteControlType()
		remotes = fileReadXML(resolveFilename(SCOPE_SKINS, "remotes.xml"), source=MODULE_NAME)
		self.remotes = []
		if remotes:
			for remote in sorted(remotes.findall("remote"), key=lambda remote: (remote.tag, remote.get("displayName"))):
				model = remote.attrib.get("model")
				rcType = remote.attrib.get("rcType")
				codeName = remote.attrib.get("codeName")
				displayName = remote.attrib.get("displayName")
				if codeName and displayName:
					if config.crash.debugRemoteControls.value:
						print("[InputDevice] Adding remote control identifier for '%s'." % displayName)
					self.remotes.append((model, rcType, codeName, displayName))
		self.remotes.insert(0, ("", "", "", _("Default")))
		if BoxInfo.getItem("RemoteTypeZeroAllowed", False):
			self.remotes.insert(1, ("", "0", "", _("All supported")))
		rcChoices = []
		default = "0"
		for index, remote in enumerate(self.remotes):
			index = str(index)
			rcChoices.append((index, remote[REMOTE_DISPLAY_NAME]))
			if self.model == remote[REMOTE_MODEL] and self.rcType == remote[REMOTE_RCTYPE] and self.rcName in [x.strip() for x in remote[REMOTE_NAME].split(",")]:
				print("[InputDevice] Default remote control identified as '%s'.  (model='%s', rcName='%s', rcType='%s')" % (remote[REMOTE_DISPLAY_NAME], self.model, self.rcName, self.rcType))
				default = index
		config.inputDevices.remotesIndex = ConfigSelection(choices=rcChoices, default=default)
		self.remote = self.loadRemoteControl(BoxInfo.getItem("RCMapping"))
コード例 #11
0
def getTranscoding():
    if BoxInfo.getItem("transcoding") or BoxInfo.getItem("multitranscoding"):
        return True
    elif os.path.isfile("/proc/stb/encoder/0/bitrate"):
        return isPluginInstalled("TranscodingSetup") or isPluginInstalled(
            "TransCodingSetup") or isPluginInstalled("MultiTransCodingSetup")
    return False
コード例 #12
0
ファイル: Standby.py プロジェクト: wedebe/enigma2
 def close(self, value):
     global quitMainloopCode
     if self.connected:
         self.connected = False
         self.session.nav.record_event.remove(self.getRecordEvent)
     if value:
         self.hide()
         if self.retval == QUIT_SHUTDOWN:
             config.misc.DeepStandby.value = True
         self.session.nav.stopService()
         self.quitScreen = self.session.instantiateDialog(
             QuitMainloopScreen, retvalue=self.retval)
         self.quitScreen.show()
         print("[Standby] quitMainloop #1")
         quitMainloopCode = self.retval
         if BoxInfo.getItem("Display") and BoxInfo.getItem("LCDMiniTV"):
             # set LCDminiTV off / fix a deep-standby-crash on some boxes / gb4k
             print("[Standby] LCDminiTV off")
             setLCDModeMinitTV("0")
         if BoxInfo.getItem(
                 "model"
         ) == "vusolo4k":  #workaround for white display flash
             open("/proc/stb/fp/oled_brightness", "w").write("0")
         if BoxInfo.getItem("model") == "pulse4k":
             open("/proc/stb/lcd/oled_brightness", "w").write("0")
         quitMainloop(self.retval)
     else:
         MessageBox.close(self, True)
コード例 #13
0
ファイル: Standby.py プロジェクト: wedebe/enigma2
    def Power(self):
        print("[Standby] leave standby")
        BoxInfo.setItem("StandbyState", False)

        if os.path.exists("/usr/script/StandbyLeave.sh"):
            Console().ePopen("/usr/script/StandbyLeave.sh &")

        if (getBrandOEM() in ('fulan', 'clap', 'dinobot') or getMachineBuild()
                in ('gbmv200', 'sf8008', 'sf8008m', 'sf8008opt', 'sx988',
                    'ustym4kpro', 'ustym4kottpremium', 'beyonwizv2', 'viper4k',
                    'og2ott4k', 'sfx6008')):
            try:
                open("/proc/stb/hdmi/output", "w").write("on")
            except:
                pass
        #set input to encoder
        self.avswitch.setInput("ENCODER")
        #restart last played service
        #unmute adc
        self.leaveMute()
        # set LCDminiTV
        if BoxInfo.getItem("Display") and BoxInfo.getItem("LCDMiniTV"):
            setLCDModeMinitTV(config.lcd.modeminitv.value)
        #kill me
        self.close(True)
コード例 #14
0
ファイル: Menu.py プロジェクト: catalinii/enigma2
    def addMenu(self, destList, node):
        requires = node.get("requires")
        if requires:
            if requires[0] == "!":
                if BoxInfo.getItem(requires[1:], False):
                    return
            elif not BoxInfo.getItem(requires, False):
                return

        MenuTitle = _(node.get("text", "??").encode(
            "UTF-8", "ignore")) if PY2 else _(node.get("text", "??"))
        entryID = node.get("entryID", "undefined")
        weight = node.get("weight", 50)
        description = _(node.get("description", "").encode(
            "UTF-8", "ignore")) if PY2 else _(node.get("description", ""))
        menupng = MenuEntryPixmap(entryID, self.png_cache, lastMenuID)
        x = node.get("flushConfigOnClose")
        if x:
            a = boundFunction(self.session.openWithCallback,
                              self.menuClosedWithConfigFlush, Menu, node)
        else:
            a = boundFunction(self.session.openWithCallback, self.menuClosed,
                              Menu, node)
        # TODO add check if !empty(node.childNodes)
        destList.append((MenuTitle, a, entryID, weight, description, menupng))
コード例 #15
0
ファイル: Lcd.py プロジェクト: TwolDE2/ATV65
 def final_scroll_delay(el):
     if model in ('sf4008', 'beyonwizu4'):
         # add workaround for Boxes who need hex code
         open(BoxInfo.getItem("VFD_final_scroll_delay"),
              "w").write(hex(int(el.value)))
     else:
         open(BoxInfo.getItem("VFD_final_scroll_delay"),
              "w").write(el.value)
コード例 #16
0
def getIceTVDeviceType():
    return {
        ("Beyonwiz", "T2"): 31,
        ("Beyonwiz", "T3"): 22,
        ("Beyonwiz", "T4"): 30,
        ("Beyonwiz", "U4"): 36,
        ("Beyonwiz", "V2"): 38,
    }.get((BoxInfo.getItem("brand"), BoxInfo.getItem("model")), 39)
コード例 #17
0
ファイル: PictureInPicture.py プロジェクト: TwolDE2/ATV65
def timedStopPipPigMode():
	from Screens.InfoBar import InfoBar
	if InfoBar.instance and InfoBar.instance.session:
		if BoxInfo.getItem("hasPIPVisibleProc"):
			open(BoxInfo.getItem("hasPIPVisibleProc"), "w").write("1")
		elif hasattr(InfoBar.instance.session, "pip"):
			InfoBar.instance.session.pip.playService(InfoBar.instance.session.pip.currentService)
	global PipPigModeEnabled
	PipPigModeEnabled = False
コード例 #18
0
ファイル: Menu.py プロジェクト: TwolDE2/ATV65
 def addItem(self, menu):
     requires = menu.get("requires")
     if requires:
         if requires[0] == "!":
             if BoxInfo.getItem(requires[1:], False):
                 return None
         elif not BoxInfo.getItem(requires, False):
             return None
     conditional = menu.get("conditional")
     if conditional and not eval(conditional):
         return None
     text = self.processDisplayedText(menu.get("text"))
     key = menu.get("key", "undefined")
     weight = menu.get("weight", 50)
     description = self.processDisplayedText(menu.get("description"))
     image = self.getMenuEntryImage(key, lastKey)
     for menuItem in menu:
         if menuItem.tag == "screen":
             module = menuItem.get("module")
             screen = menuItem.get("screen")
             if screen is None:
                 screen = module
             module = "Screens.%s" % module if module else ""
             screen = "%s, %s" % (
                 screen, menuItem.text or ""
             )  # Check for arguments, they will be appended to the openDialog call.
             return (text, boundFunction(self.runScreen, (module, screen)),
                     key, weight, description, image)
         elif menuItem.tag == "plugin":
             extensions = menuItem.get("extensions")
             system = menuItem.get("system")
             screen = menuItem.get("screen")
             if extensions:
                 module = extensions
             elif system:
                 module = system
             if screen is None:
                 screen = module
             if extensions:
                 module = "Plugins.Extensions.%s.plugin" % extensions
             elif system:
                 module = "Plugins.SystemPlugins.%s.plugin" % system
             else:
                 module = ""
             screen = "%s, %s" % (
                 screen, menuItem.text or ""
             )  # Check for arguments, they will be appended to the openDialog call.
             return (text, boundFunction(self.runScreen, (module, screen)),
                     key, weight, description, image)
         elif menuItem.tag == "code":
             return (text, boundFunction(self.execText, menuItem.text), key,
                     weight, description, image)
         elif menuItem.tag == "setup":
             setupKey = menuItem.get("setupKey", "Undefined")
             return (text, boundFunction(self.openSetup, setupKey), key,
                     weight, description, image)
     return (text, self.nothing, key, weight, description, image)
コード例 #19
0
	def gotRecordEvent(self, service, event):
		prev_records = self.records_running
		if event in (iRecordableService.evEnd, iRecordableService.evStart, None):
			recs = self.session.nav.getRecordings()
			if BoxInfo.getItem("LCDsymbol_circle_recording"):
				open(BoxInfo.getItem("LCDsymbol_circle_recording"), "w").write(recs and "1" or "0")
			self.records_running = len(recs)
			if self.records_running != prev_records:
				self.changed((self.CHANGED_ALL,))
コード例 #20
0
ファイル: Ci.py プロジェクト: wedebe/enigma2
 def createEntries(self, slot):
     if BoxInfo.getItem("CommonInterfaceSupportsHighBitrates"):
         self.HighBitrateEntry[slot] = getConfigListEntry(
             _("High bitrate support"),
             config.ci[slot].canHandleHighBitrates)
     if BoxInfo.getItem("RelevantPidsRoutingSupport"):
         self.RelevantPidsRoutingEntry[slot] = getConfigListEntry(
             _("Relevant PIDs Routing"),
             config.ci[slot].relevantPidsRouting)
コード例 #21
0
    def addItem(self, destList, node):
        requires = node.get("requires")
        if requires:
            if requires[0] == "!":
                if BoxInfo.getItem(requires[1:], False):
                    return
            elif not BoxInfo.getItem(requires, False):
                return
        conditional = node.get("conditional")
        if conditional and not eval(conditional):
            return
        item_text = node.get("text", "").encode(
            "UTF-8", "ignore") if PY2 else node.get("text", "")
        entryID = node.get("entryID", "undefined")
        weight = node.get("weight", 50)
        for x in node:
            if x.tag == "screen":
                module = x.get("module")
                screen = x.get("screen")

                if screen is None:
                    screen = module

                # print(module, screen)
                if module:
                    module = "Screens." + module
                else:
                    module = ""

                # check for arguments. they will be appended to the
                # openDialog call
                args = x.text or ""
                screen += ", " + args

                destList.append(
                    (_(item_text or "??"),
                     boundFunction(self.runScreen,
                                   (module, screen)), entryID, weight))
                return
            elif x.tag == "code":
                destList.append(
                    (_(item_text
                       or "??"), boundFunction(self.execText,
                                               x.text), entryID, weight))
                return
            elif x.tag == "setup":
                id = x.get("id")
                if item_text == "":
                    item_text = _(getSetupTitle(id))
                else:
                    item_text = _(item_text)
                destList.append(
                    (item_text, boundFunction(self.openSetup,
                                              id), entryID, weight))
                return
        destList.append((item_text, self.nothing, entryID, weight))
コード例 #22
0
 def changeAACDownmix(self, downmix):
     if BoxInfo.getItem("DreamBoxAudio") or BoxInfo.getItem("platform") in (
             "gb7252", "gb72604"):
         config.av.downmix_aac.setValue(downmix.value)
     else:
         if downmix.value:
             config.av.downmix_aac.setValue(True)
         else:
             config.av.downmix_aac.setValue(False)
     config.av.downmix_aac.save()
コード例 #23
0
 def __init__(self, url, outfile, headers=None):
     client.HTTPDownloader.__init__(
         self,
         url,
         outfile,
         headers=headers,
         agent="%s %s Enigma2 HbbTV/1.1.1 (+PVR+RTSP+DL;OpenVision;;;)" %
         (BoxInfo.getItem("brand"), BoxInfo.getItem("model")))
     self.status = self.progress_callback = self.error_callback = self.end_callback = None
     self.deferred = defer.Deferred()
コード例 #24
0
ファイル: Ci.py プロジェクト: OpenVisionE2/enigma2-openvision
    def appendEntries(self, slot, state):
        self.state[slot] = state
        if self.slot > 1:
            self.list.append(
                ("**************************", ConfigNothing(), 3, slot))
        self.list.append((_("Reset"), ConfigNothing(), 0, slot))
        self.list.append((_("Init"), ConfigNothing(), 1, slot))

        if self.state[slot] == 0:  #no module
            self.list.append((_("no module found"), ConfigNothing(), 2, slot))
        elif self.state[slot] == 1:  #module in init
            self.list.append((_("init module"), ConfigNothing(), 2, slot))
        elif self.state[slot] == 2:  #module ready
            appname = eDVBCI_UI.getInstance().getAppName(slot)
            self.list.append((appname, ConfigNothing(), 2, slot))
        self.list.append(
            getConfigListEntry(_("Set persistent PIN code"),
                               config.ci[slot].use_static_pin, 3, slot))
        self.list.append(
            (_("Enter persistent PIN code"), ConfigNothing(), 5, slot))
        self.list.append(
            (_("Reset persistent PIN code"), ConfigNothing(), 6, slot))
        self.list.append(
            getConfigListEntry(_("Show CI messages"),
                               config.ci[slot].show_ci_messages, 3, slot))
        self.list.append(
            getConfigListEntry(_("Multiple service support"),
                               config.ci[slot].canDescrambleMultipleServices,
                               3, slot))
        if BoxInfo.getItem("CI%dSupportsHighBitrates" % slot):
            self.list.append(
                getConfigListEntry(_("High bitrate support"),
                                   config.ci[slot].canHandleHighBitrates, 3,
                                   slot))
        if BoxInfo.getItem("CI%dRelevantPidsRoutingSupport" % slot):
            self.list.append(
                getConfigListEntry(_("PID Filtering"),
                                   config.ci[slot].relevantPidsRouting, 3,
                                   slot))
        if BoxInfo.getItem("CommonInterfaceCIDelay"):
            self.list.append(
                getConfigListEntry(_("DVB CI Delay"), config.cimisc.dvbCiDelay,
                                   3, slot))
        if BoxInfo.getItem("HaveCISSL"):
            self.list.append(
                getConfigListEntry(
                    _("CI Operation Mode"), config.cimisc.civersion,
                    _("Choose the CI protocol operation mode for standard CI or CI Plus."
                      )))
        else:
            self.list.append(
                getConfigListEntry(
                    _("CI Operation Mode"), config.cimisc.civersion,
                    _("Your hardware can detect CI mode itself or works only in legacy mode."
                      )))
コード例 #25
0
	def setupConfigEntries(self, device):
		setattr(config.inputDevices, device, ConfigSubsection())
		configItem = getattr(config.inputDevices, device)
		configItem.enabled = ConfigYesNo(default=BoxInfo.getItem("RemoteEnable", False))
		configItem.enabled.addNotifier(self.inputDevicesEnabledChanged)
		configItem.name = ConfigText(default=inputDevices.devices[device]["name"])
		configItem.name.addNotifier(self.inputDevicesNameChanged)
		configItem.repeat = ConfigSelectionNumber(default=BoxInfo.getItem("RemoteRepeat", 100), min=0, max=500, stepwidth=10)
		configItem.repeat.addNotifier(self.inputDevicesRepeatChanged)
		configItem.delay = ConfigSelectionNumber(default=BoxInfo.getItem("RemoteDelay", 700), min=0, max=5000, stepwidth=100)
		configItem.delay.addNotifier(self.inputDevicesDelayChanged)
コード例 #26
0
def getCPUBrand():
    if BoxInfo.getItem("AmlogicFamily"):
        return _("Amlogic")
    elif BoxInfo.getItem("HiSilicon"):
        return _("HiSilicon")
    elif socfamily.startswith("smp"):
        return _("Sigma Designs")
    elif socfamily.startswith("bcm") or BoxInfo.getItem("brand") == "rpi":
        return _("Broadcom")
    print("[About] No CPU brand?")
    return _("Undefined")
コード例 #27
0
ファイル: InputDevice.py プロジェクト: wedebe/enigma2
	def setupConfigEntries(self, device):
		setattr(config.inputDevices, device, ConfigSubsection())
		configItem = getattr(config.inputDevices, device)
		configItem.enabled = ConfigYesNo(default=BoxInfo.getItem("RemoteEnable", False))
		configItem.enabled.addNotifier(self.inputDevicesEnabledChanged)
		configItem.name = ConfigText(default="")
		configItem.name.addNotifier(self.inputDevicesNameChanged)
		configItem.repeat = ConfigSlider(default=BoxInfo.getItem("RemoteRepeat", 100), increment = 10, limits=(0, 500))
		configItem.repeat.addNotifier(self.inputDevicesRepeatChanged)
		configItem.delay = ConfigSlider(default=BoxInfo.getItem("RemoteDelay", 700), increment = 100, limits=(0, 5000))
		configItem.delay.addNotifier(self.inputDevicesDelayChanged)
コード例 #28
0
 def formatItemDescription(self, item, itemDescription):
     itemDescription = itemDescription.replace(
         "%s %s", "%s %s" %
         (BoxInfo.getItem("displaybrand"), BoxInfo.getItem("displaymodel")))
     if config.usage.setupShowDefault.value:
         spacer = "\n" if config.usage.setupShowDefault.value == "newline" else "  "
         itemDefault = item.toDisplayString(item.default)
         itemDescription = _("%s%s(Default: %s)") % (
             itemDescription, spacer, itemDefault
         ) if itemDescription and itemDescription != " " else _(
             "Default: '%s'.") % itemDefault
     return itemDescription
コード例 #29
0
 def __init__(self, callback):
     if BoxInfo.getItem("canMultiBoot"):
         self.slots = sorted(list(BoxInfo.getItem("canMultiBoot").keys()))
         self.callback = callback
         self.imagelist = {}
         if not path.isdir(Imageroot):
             mkdir(Imageroot)
         self.container = Console()
         self.phase = self.MOUNT
         self.run()
     else:
         callback({})
コード例 #30
0
ファイル: qpip.py プロジェクト: TwolDE2/ATV65
    def __onClose(self):
        self.disableQuadPip()
        setDecoderMode("normal")

        if BoxInfo.getItem("FastChannelChange", False):
            self.enableFCC()

        if BoxInfo.getItem("MiniTV", False):
            self.enableMiniTV()

        self.qpipChannelList.saveAll()
        self.session.nav.playService(self.oldService)