Beispiel #1
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)
Beispiel #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)
Beispiel #3
0
    def __init__(self, session, g_serverConfig):
        printl("", self, "S")
        DPH_Screen.__init__(self, session)
        DPH_ScreenHelper.__init__(self)
        DPH_Filter.__init__(self)
        DPH_PlexScreen.__init__(self)

        self.selectionOverride = None
        printl("selectionOverride:" + str(self.selectionOverride), self, "D")
        self.session = session

        self.g_serverConfig = g_serverConfig
        self.plexInstance = Singleton().getPlexInstance()
        self.guiElements = getGuiElements()

        self.initScreen("server_menu")
        self.initMenu()

        if self.g_horizontal_menu:
            self.setHorMenuElements(depth=2)
            self.translateNames()

        self["title"] = StaticText()

        self["menu"] = List(enableWrapAround=True)

        self["actions"] = HelpableActionMap(
            self,
            "DP_MainMenuActions",
            {
                "ok": (self.okbuttonClick, ""),
                "left": (self.left, ""),
                "right": (self.right, ""),
                "up": (self.up, ""),
                "down": (self.down, ""),
                "cancel": (self.cancel, ""),
                "red": (self.onKeyRed, ""),
                "green": (self.onKeyGreen, ""),
            },
            -2,
        )

        self["btn_green"] = Pixmap()
        self["btn_green"].hide()
        self["btn_greenText"] = Label()

        self["text_HomeUserLabel"] = Label()
        self["text_HomeUser"] = Label()

        self.onLayoutFinish.append(self.finishLayout)
        self.onLayoutFinish.append(self.getInitialData)
        self.onLayoutFinish.append(self.checkSelectionOverride)

        printl("", self, "C")
Beispiel #4
0
	def __init__(self, session, g_serverConfig ):
		printl("", self, "S")
		DPH_Screen.__init__(self, session)
		DPH_ScreenHelper.__init__(self)
		DPH_Filter.__init__(self)
		DPH_PlexScreen.__init__(self)

		self.selectionOverride = None
		printl("selectionOverride:" +str(self.selectionOverride), self, "D")
		self.session = session

		self.g_serverConfig = g_serverConfig
		self.plexInstance = Singleton().getPlexInstance()
		self.guiElements = getGuiElements()

		self.initScreen("server_menu")
		self.initMenu()

		if self.g_horizontal_menu:
			self.setHorMenuElements(depth=2)
			self.translateNames()

		self["title"] = StaticText()

		self["menu"]= List(enableWrapAround=True)

		self["actions"] = HelpableActionMap(self, "DP_MainMenuActions",
			{
				"ok":		(self.okbuttonClick, ""),
				"left":		(self.left, ""),
				"right":	(self.right, ""),
				"up":		(self.up, ""),
				"down":		(self.down, ""),
				"cancel":	(self.cancel, ""),
			    "red":		(self.onKeyRed, ""),
			    "green":    (self.onKeyGreen, ""),
			}, -2)

		self["btn_green"]		= Pixmap()
		self["btn_green"].hide()
		self["btn_greenText"]   = Label()

		self["text_HomeUserLabel"]   = Label()
		self["text_HomeUser"]   = Label()

		self.onLayoutFinish.append(self.finishLayout)
		self.onLayoutFinish.append(self.getInitialData)
		self.onLayoutFinish.append(self.checkSelectionOverride)

		printl("", self, "C")
Beispiel #5
0
    def __init__(self, session, initDir, myType):
        printl("", self, "S")

        Screen.__init__(self, session)
        DPH_PlexScreen.__init__(self)

        self.guiElements = getGuiElements()

        self.myType = myType
        inhibitDirs = [
            "/bin", "/boot", "/dev", "/etc", "/lib", "/proc", "/sbin", "/sys",
            "/usr", "/var"
        ]
        inhibitMounts = []
        self["filelist"] = FileList(initDir,
                                    showFiles=False,
                                    inhibitMounts=inhibitMounts,
                                    inhibitDirs=inhibitDirs)
        self["target"] = Label()
        self["target"].setText(initDir)
        self["actions"] = ActionMap(
            [
                "WizardActions", "DirectionActions", "ColorActions",
                "EPGSelectActions"
            ], {
                "back": self.cancel,
                "left": self.left,
                "right": self.right,
                "up": self.up,
                "down": self.down,
                "ok": self.ok,
                "green": self.green,
                "red": self.cancel
            }, -1)

        self["targetText"] = Label()

        self["btn_red"] = Pixmap()
        self["btn_redText"] = Label()

        self["btn_green"] = Pixmap()
        self["btn_greenText"] = Label()

        self.onLayoutFinish.append(self.finishLayout)

        printl("", self, "C")
Beispiel #6
0
    def __init__(self, session, what=None):
        printl("", self, "S")

        Screen.__init__(self, session)
        DPH_PlexScreen.__init__(self)
        self.session = session
        from Components.Sources.List import List

        self.guiElements = getGuiElements()

        self["entryList"] = List(self.builEntryList(), True)
        self["header"] = Label()
        self["columnHeader"] = Label()

        self["btn_redText"] = Label()
        self["btn_red"] = Pixmap()

        self["btn_greenText"] = Label()
        self["btn_green"] = Pixmap()

        self["btn_yellowText"] = Label()
        self["btn_yellow"] = Pixmap()

        self["btn_blueText"] = Label()
        self["btn_blue"] = Pixmap()

        self["actions"] = ActionMap(
            ["WizardActions", "MenuActions", "ShortcutActions"],
            {
                "ok": self.keyOk,
                "back": self.keyClose,
                "red": self.keyRed,
                "yellow": self.keyYellow,
                "green": self.keyGreen,
                "blue": self.keyBlue,
            },
            -1,
        )
        self.what = what

        self.onLayoutFinish.append(self.finishLayout)

        printl("", self, "C")
Beispiel #7
0
    def __init__(self, session, what=None):
        printl("", self, "S")

        Screen.__init__(self, session)
        DPH_PlexScreen.__init__(self)

        from Components.Sources.List import List

        self.guiElements = getGuiElements()

        self["entryList"] = List(self.builEntryList(), True)
        self["header"] = Label()
        self["columnHeader"] = Label()

        self["btn_redText"] = Label()
        self["btn_red"] = Pixmap()

        self["btn_greenText"] = Label()
        self["btn_green"] = Pixmap()

        self["btn_yellowText"] = Label()
        self["btn_yellow"] = Pixmap()

        self["btn_blueText"] = Label()
        self["btn_blue"] = Pixmap()

        self["actions"] = ActionMap(
            ["WizardActions", "MenuActions", "ShortcutActions"], {
                "ok": self.keyOk,
                "back": self.keyClose,
                "red": self.keyRed,
                "yellow": self.keyYellow,
                "green": self.keyGreen,
                "blue": self.keyBlue,
            }, -1)
        self.what = what

        self.onLayoutFinish.append(self.finishLayout)

        printl("", self, "C")
Beispiel #8
0
    def __init__(self, session):
        printl("", self, "S")

        Screen.__init__(self, session)
        HelpableScreen.__init__(self)
        DPH_PlexScreen.__init__(self)

        self.guiElements = getGuiElements()

        self.cfglist = []
        ConfigListScreen.__init__(self,
                                  self.cfglist,
                                  session,
                                  on_change=self._changed)

        self._hasChanged = False

        self["btn_greenText"] = Label()
        self["btn_green"] = Pixmap()

        self["help"] = StaticText()

        self["setupActions"] = ActionMap(
            ["SetupActions", "ColorActions", "DPS_Settings"], {
                "green": self.keySave,
                "red": self.keyCancel,
                "cancel": self.keyCancel,
                "ok": self.ok,
                "left": self.keyLeft,
                "right": self.keyRight,
                "bouquet_up": self.keyBouquetUp,
                "bouquet_down": self.keyBouquetDown,
            }, -2)

        self.createSetup()

        self["config"].onSelectionChanged.append(self.updateHelp)
        self.onLayoutFinish.append(self.finishLayout)

        printl("", self, "C")
Beispiel #9
0
	def __init__(self, session, initDir, myType):
		printl("", self, "S")
		
		Screen.__init__(self, session)
		DPH_PlexScreen.__init__(self)

		self.guiElements = getGuiElements()

		self.myType = myType
		inhibitDirs = ["/bin", "/boot", "/dev", "/etc", "/lib", "/proc", "/sbin", "/sys", "/usr", "/var"]
		inhibitMounts = []
		self["filelist"] = FileList(initDir, showFiles=False, inhibitMounts=inhibitMounts, inhibitDirs=inhibitDirs)
		self["target"] = Label()
		self["target"].setText(initDir)
		self["actions"] = ActionMap(["WizardActions", "DirectionActions", "ColorActions", "EPGSelectActions"],
		{
			"back": self.cancel,
			"left": self.left,
			"right": self.right,
			"up": self.up,
			"down": self.down,
			"ok": self.ok,
			"green": self.green,
			"red": self.cancel
			
		}, -1)

		self["targetText"] = Label()

		self["btn_red"]			= Pixmap()
		self["btn_redText"]		= Label()

		self["btn_green"]		= Pixmap()
		self["btn_greenText"]   = Label()

		self.onLayoutFinish.append(self.finishLayout)
		
		printl("", self, "C")
Beispiel #10
0
	def __init__(self, session):
		printl("", self, "S")
		
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)
		DPH_PlexScreen.__init__(self)

		self.guiElements = getGuiElements()
		
		self.cfglist = []
		ConfigListScreen.__init__(self, self.cfglist, session, on_change = self._changed)
		
		self._hasChanged = False

		self["btn_greenText"] = Label()
		self["btn_green"] = Pixmap()

		self["help"] = StaticText()
		
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "DPS_Settings"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"cancel": self.keyCancel,
			"ok": self.ok,
			"left": self.keyLeft,
			"right": self.keyRight,
			"bouquet_up":	self.keyBouquetUp,
			"bouquet_down":	self.keyBouquetDown,
		}, -2)

		self.createSetup()
		
		self["config"].onSelectionChanged.append(self.updateHelp)
		self.onLayoutFinish.append(self.finishLayout)

		printl("", self, "C")