Esempio n. 1
0
def checkSkinResolution():
    printl("", "__init__::checkSkinResolution", "S")

    boxResolution = str(getBoxResolution())
    printl("boxResolution: " + boxResolution,
           "__common__::checkSkinResolution", "S")

    skinResolution = str(getSkinResolution())
    printl("skinResolution: " + skinResolution,
           "__common__::checkSkinResolution", "S")

    if boxResolution == "HD" and skinResolution == "FHD":
        # if there is setup another FHD skin but the box skin is HD we switch automatically to default HD skin to avoid wrong screen size
        # which leads to unconfigurable dreamplex
        skinfolder = "/usr/lib/enigma2/python/Plugins/Extensions/DreamPlex/skins/default"
        printl(
            "switching to default due to mismatch of box and skin resolution!")

        setSkinFolder(currentSkinFolder=skinfolder)
        printl("current skinfolder: " + skinfolder,
               "__common__::checkSkinResolution", "S")

        configXml = getXmlContent(skinfolder + "/params")
        Singleton().getSkinParamsInstance(configXml)

    printl("", "__init__::checkSkinResolution", "C")
Esempio n. 2
0
	def __init__(self, session, mode, serverConfig=None):
		Screen.__init__(self, session)
		DPH_ScreenHelper.__init__(self)
		DPH_PlexScreen.__init__(self)

		self.guiElements = getGuiElements()

		self.initScreen("syncer")
		self.serverConfig = serverConfig

		self.resolution = getSkinResolution()

		if serverConfig is not None:
			# now that we know the server we establish global plexInstance
			self.plexInstance = Singleton().getPlexInstance(PlexLibrary(self.session, self.serverConfig))

		# we are "sync" or "render"
		self._mode = mode

		# we use the global g_mediaSyncerInfo.instance to take care only having one instance
		self.mediaSyncerInfo = g_mediaSyncerInfo.instance

		self["output"] = ScrollLabel()
		self["progress"] = Label()

		# we use this counter to reset scorll label every x entries to stay responsive
		self.counter = 0

		self["btn_greenText"] = Label()
		if self._mode == "sync":
			self["btn_greenText"].setText(_("Start Sync"))
		else:
			self["btn_greenText"].setText(_("Start Rendering"))
		self["btn_green"] = Pixmap()

		self["btn_blueText"] = Label()
		self["btn_blueText"].setText(_("Background"))
		self["btn_blue"] = Pixmap()

		self["btn_redText"] = Label()
		self["btn_redText"].setText(_("Abort"))
		self["btn_red"] = Pixmap()

		self["setupActions"] = ActionMap(["DPS_Syncer"],
		{
			"red": self.keyRed,
			"blue": self.keyBlue,
			"yellow": self.keyYellow,
			"green": self.keyGreen,
			"bouquet_up": self.keyBouquetUp,
			"bouquet_down": self.keyBouquetDown,
			"cancel": self.exit,
		}, -2)

		self.onFirstExecBegin.append(self.startup)
		self.onShown.append(self.finishLayout)
		self.onClose.append(self.__onClose)
Esempio n. 3
0
	def __init__(self, session, mode, serverConfig=None):
		Screen.__init__(self, session)
		DPH_ScreenHelper.__init__(self)
		DPH_PlexScreen.__init__(self)

		self.guiElements = getGuiElements()

		self.initScreen("syncer")
		self.serverConfig = serverConfig

		self.resolution = getSkinResolution()

		if serverConfig is not None:
			# now that we know the server we establish global plexInstance
			self.plexInstance = Singleton().getPlexInstance(PlexLibrary(self.session, self.serverConfig))

		# we are "sync" or "render"
		self._mode = mode

		# we use the global g_mediaSyncerInfo.instance to take care only having one instance
		self.mediaSyncerInfo = g_mediaSyncerInfo.instance

		self["output"] = ScrollLabel()
		self["progress"] = Label()

		# we use this counter to reset scorll label every x entries to stay responsive
		self.counter = 0

		self["btn_greenText"] = Label()
		if self._mode == "sync":
			self["btn_greenText"].setText(_("Start Sync"))
		else:
			self["btn_greenText"].setText(_("Start Rendering"))
		self["btn_green"] = Pixmap()

		self["btn_blueText"] = Label()
		self["btn_blueText"].setText(_("Background"))
		self["btn_blue"] = Pixmap()

		self["btn_redText"] = Label()
		self["btn_redText"].setText(_("Abort"))
		self["btn_red"] = Pixmap()

		self["setupActions"] = ActionMap(["DPS_Syncer"],
		{
			"red": self.keyRed,
			"blue": self.keyBlue,
			"yellow": self.keyYellow,
			"green": self.keyGreen,
			"bouquet_up": self.keyBouquetUp,
			"bouquet_down": self.keyBouquetDown,
			"cancel": self.exit,
		}, -2)

		self.onFirstExecBegin.append(self.startup)
		self.onShown.append(self.finishLayout)
		self.onClose.append(self.__onClose)
Esempio n. 4
0
	def __init__ (self):
		Thread.__init__(self)
		self.cancel = False
		self.arg = None
		self.messages = ThreadQueue()
		self.messagePump = ePythonMessagePump()

		self.progress = ThreadQueue()
		self.progressPump = ePythonMessagePump()

		self.resolution = getSkinResolution()

		self.running = False
Esempio n. 5
0
	def __init__ (self):
		Thread.__init__(self)
		self.cancel = False
		self.arg = None
		self.messages = ThreadQueue()
		self.messagePump = ePythonMessagePump()

		self.progress = ThreadQueue()
		self.progressPump = ePythonMessagePump()

		self.resolution = getSkinResolution()

		self.running = False
Esempio n. 6
0
def checkSkinResolution():
	printl("", "__init__::checkSkinResolution", "S")

	boxResolution = str(getBoxResolution())
	printl("boxResolution: " + boxResolution, "__common__::checkSkinResolution", "S")

	skinResolution = str(getSkinResolution())
	printl("skinResolution: " + skinResolution, "__common__::checkSkinResolution", "S")

	if boxResolution == "HD" and skinResolution == "FHD":
		# if there is setup another FHD skin but the box skin is HD we switch automatically to default HD skin to avoid wrong screen size
		# which leads to unconfigurable dreamplex
		skinfolder = "/usr/lib/enigma2/python/Plugins/Extensions/DreamPlex/skins/default"
		printl("switching to default due to mismatch of box and skin resolution!")

		setSkinFolder(currentSkinFolder=skinfolder)
		printl("current skinfolder: " + skinfolder, "__common__::checkSkinResolution", "S")

		configXml = getXmlContent(skinfolder + "/params")
		Singleton().getSkinParamsInstance(configXml)

	printl("", "__init__::checkSkinResolution", "C")
Esempio n. 7
0
	def __init__(self):

		self.skinResolution = getSkinResolution()
Esempio n. 8
0
    def __init__(self):

        self.skinResolution = getSkinResolution()