Beispiel #1
0
	def keyRed(self):
		printl("", self, "S")

		client = PlexGdm(debug=3)
		version = str(getVersion())
		gBoxType = getBoxInformation()
		clientBox = gBoxType[1]
		printl("clientBox: " + str(gBoxType), self, "D")
		client.clientDetails(clientBox, "DreamPlex Client", "3003", "DreamPlex", version)

		client.start_discovery()
		while not client.discovery_complete:
			print "Waiting for results"
			time.sleep(1)
		
		client.stop_discovery()
		serverList = client.getServerList()
		printl("serverList: " + str(serverList),self, "D")
		
		menu = []
		for server in serverList:
			printl("server: " + str(server), self, "D")
			menu.append((str(server.get("serverName")) + " (" + str(server.get("server")) + ":" + str(server.get("port")) + ")", server,))
			
		printl("menu: " + str(menu), self, "D")
		self.session.openWithCallback(self.useSelectedServerData, ChoiceBox, title=_("Select server"), list=menu)
		
		printl("", self, "C")
Beispiel #2
0
	def __init__(self, session):
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)
		
		self.cfglist = []
		ConfigListScreen.__init__(self, self.cfglist, session, on_change = self._changed)
		
		self._session = session
		self._hasChanged = False
		self.version = getVersion()
		self.controller = None
		self.selected = None
		self.sampleUse = False
		self.aspect = getAspect()
		self.old_service = self.session.nav.getCurrentlyPlayingServiceReference()	
			
		self["txt_green"] = Label()
		self["btn_green"] = Pixmap()

		self["statusbar"] = Pixmap()
		self["txt_arrows"] = Label()
		self["txt_statusbar"] = Label()
		self["txt_statusbar_info"] = Label()

		self["version"] = StaticText()

		self["txt_green"].setText(_("Save"))
		self["txt_arrows"].setText(_("Use < > to jump with 10 in slider"))
		self["version"].text = self.version
		
		# Disable OSD Transparency
		try:
			self.can_osd_alpha = open("/proc/stb/video/alpha", "r") and True or False
		except:
			self.can_osd_alpha = False
		
		if config.plugins.enigmalight.sampleBackground.getValue() == True:
			self.showBackground()

		self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "EL_Settings"],
		{
			"green": self.keySave,
			"cancel": self.exitTuning,
			"ok": self.ok,
			"left": self.keyLeft,
			"right": self.keyRight,
			"bouquet_up":	self.keyBouquetUp,
			"bouquet_down":	self.keyBouquetDown,
			"jumpNextMark":	self.keyNext,
			"jumpPreviousMark": self.keyPrev,
		}, -2)

		self.createSetup()
		
		log("",self,"Finisch layout..")

		#self["config"].onSelectionChanged.append(self.updateHelp)
		self.onLayoutFinish.append(self.finishLayout)
Beispiel #3
0
    def checkForUpdate(self, silent=False):
        printl("", self, "S")
        self.package = "python-pyopenssl"

        if testInetConnectivity() and self.checkInstallationState(True):
            printl("Starting request", self, "D")

            conn = httplib.HTTPSConnection("api.github.com",
                                           timeout=10,
                                           port=443)
            conn.request(url="/repos/DonDavici/DreamPlex/tags",
                         method="GET",
                         headers=getUserAgentHeader())
            data = conn.getresponse()
            self.response = data.read()

            printl("response: " + str(self.response), self, "D")
            starter = 19
            closer = self.response.find('",', 0, 50)
            printl("closer: " + str(closer), self, "D")
            latestVersion = self.response[
                starter:
                closer]  # is a bit dirty but better than forcing users to install simplejson
            printl("latestVersion: " + str(latestVersion), self, "D")

            installedVersion = getVersion()
            printl("InstalledVersion: " + str(installedVersion), self, "D")

            isBeta = self.checkIfBetaVersion(latestVersion)
            printl("isBeta: " + str(isBeta), self, "D")

            if config.plugins.dreamplex.updateType.value == "1" and isBeta == True:  # Stable
                latestVersion = self.searchLatestStable()

            if latestVersion > installedVersion:
                self.latestVersion = latestVersion
                self.session.openWithCallback(
                    self.startUpdate, MessageBox,
                    _("Your current Version is " + str(installedVersion) +
                      "\nUpdate to revision " + str(latestVersion) +
                      " found!\n\nDo you want to update now?"),
                    MessageBox.TYPE_YESNO)

            else:
                if not silent:
                    self.session.openWithCallback(self.close, MessageBox,
                                                  _("No update available"),
                                                  MessageBox.TYPE_INFO)

        else:
            if not silent:
                self.session.openWithCallback(
                    self.close, MessageBox,
                    _("No internet connection available or openssl is not installed!"
                      ), MessageBox.TYPE_INFO)

        printl("", self, "C")
Beispiel #4
0
    def __init__(self, session):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)
        self.cfglist = []
        ConfigListScreen.__init__(self,
                                  self.cfglist,
                                  session,
                                  on_change=self._changed)
        self._session = session
        self._hasChanged = False
        self.version = getVersion()
        self.controller = None
        self.selected = None
        self.sampleUse = False
        self.aspect = getAspect()
        self.old_service = self.session.nav.getCurrentlyPlayingServiceReference(
        )
        self["txt_green"] = Label()
        self["btn_green"] = Pixmap()
        self["statusbar"] = Pixmap()
        self["txt_arrows"] = Label()
        self["txt_statusbar"] = Label()
        self["txt_statusbar_info"] = Label()
        self["version"] = StaticText()
        self["txt_green"].setText(_("Save"))
        self["txt_arrows"].setText(_("Use < > to jump with 10 in slider"))
        self["version"].text = self.version
        # Disable OSD Transparency
        try:
            self.can_osd_alpha = open("/proc/stb/video/alpha",
                                      "r") and True or False
        except:
            self.can_osd_alpha = False
        if config.plugins.enigmalight.sampleBackground.getValue() == True:
            self.showBackground()

        self["setupActions"] = ActionMap(
            ["SetupActions", "ColorActions", "EL_Settings"], {
                "green": self.keySave,
                "cancel": self.exitTuning,
                "ok": self.ok,
                "left": self.keyLeft,
                "right": self.keyRight,
                "bouquet_up": self.keyBouquetUp,
                "bouquet_down": self.keyBouquetDown,
                "jumpNextMark": self.keyNext,
                "jumpPreviousMark": self.keyPrev,
            }, -2)

        self.createSetup()

        log("", self, "Finisch layout..")

        #self["config"].onSelectionChanged.append(self.updateHelp)
        self.onLayoutFinish.append(self.finishLayout)
Beispiel #5
0
 def getContentText(self):
     content = ""
     content += "EnigmaLight - Ambilight for Enigma2 \n\n"
     content += "Version: \t" + getVersion() + "\n\n"
     content += "Autors: \t Speedy1985 and Oktay Oeztueter\n"
     content += "Translations: \t HolyMoly/Speedy1985/ Dimitrij\n"
     content += "Some GUI Code: \t DonDavici (c) 2012\n"
     content += "\n"
     content += "For support you can send me an email or use the chat function at http://www.enigmalight.net/\n\n"
     content += "If you like EnigmaLight and want support me, you can buy me a beer :-)"
     return content
Beispiel #6
0
	def getContentText(self):
		content = ""
		content += "EnigmaLight - Ambilight for Enigma2 \n\n" 
		content += "Version: \t" + getVersion() + "\n\n"
		content += "Autors: \t Speedy1985 and Oktay Oeztueter\n"
		content += "Translations: \t HolyMoly and Speedy1985\n"
		content += "Some GUI Code: \t DonDavici (c) 2012\n"
		content += "\n"
		content += "For support you can send me an email or use the chat function at http://www.enigmalight.net/\n\n"
		content += "If you like EnigmaLight and want support me, you can buy me a beer :-)"
		
		
		return content
Beispiel #7
0
	def checkForUpdate(self,controller):
		
		self.controller = controller

		log("",self,"Check for update....")

		self.controller.setStatusBarInfo(_("Check for update.."))

		if testInetConnectivity():
			self.url = config.plugins.enigmalight.url.value + config.plugins.enigmalight.updatexml.value
			log("",self,"Checking URL: " + self.url) 
			try:
				f = urllib2.urlopen(self.url)
				html = f.read()
				dom = parseString(html)
				update = dom.getElementsByTagName("update")[0]
				version = update.getElementsByTagName("version")[0]

				remoteversion = version.childNodes[0].data
				urls = update.getElementsByTagName("url")

				currentversion = getVersion()
				currentbeta = currentversion[-2:]
				remotebeta = remoteversion[-2:]

				self.remoteurl = ""
				for url in urls:
				    self.remoteurl = url.childNodes[0].data

				#print("""Version: %s - URL: %s""" % (remoteversion, self.remoteurl))
				if currentbeta < remotebeta:
					self.latestVersion = remoteversion
					self.controller.setStatusBarInfo(_("New update available !!"))
					#if self.session != None:
					self.session.openWithCallback(self.startUpdate, MessageBox,_("Your current Version is " + str(currentversion) + "\nUpdate to " + str(remoteversion) + " found!\n\nDo you want to update now?"), MessageBox.TYPE_YESNO)
				else:
					self.controller.setStatusBarInfo(_("No update available.."))
					#if self.session != None:
					showMessage(self.session, _("No update available.."), "I")
			except:
				from traceback import format_exc
				log("",self,"Error: " +format_exc())
				try:
					log("",self,"Could not download HTTP Page")
					open(getCrashFilePath(),"w").write(format_exc())
				except:
					pass
				
		else:
			self.controller.setStatusBarInfo(_("No Internetconnection.."))
			self.session.openWithCallback(self.close, MessageBox,_("No internet connection available or curl is not installed!"), MessageBox.TYPE_INFO)
Beispiel #8
0
    def checkForUpdate(self):
        printl("", self, "S")

        if testInetConnectivity() and self.checkCurlInstallation(True):
            printl("Starting request", self, "D")
            curl_string = 'curl -s -k "%s"' % "https://api.github.com/repos/DonDavici/DreamPlex/tags"

            printl("curl_string: " + str(curl_string), self, "D")
            self.response = popen(curl_string).read()
            printl("response: " + str(self.response), self, "D")
            starter = 19
            closer = self.response.find('",', 0, 50)
            printl("closer: " + str(closer), self, "D")
            latestVersion = self.response[
                starter:
                closer]  # is a bit dirty but better than forcing users to install simplejson
            printl("latestVersion: " + str(latestVersion), self, "D")

            installedVersion = getVersion()
            printl("InstalledVersion: " + str(installedVersion), self, "D")

            isBeta = self.checkIfBetaVersion(latestVersion)
            printl("isBeta: " + str(isBeta), self, "D")

            if config.plugins.dreamplex.updateType.value == "1" and isBeta == True:  # Stable
                latestVersion = self.searchLatestStable()

            if latestVersion > installedVersion:
                self.latestVersion = latestVersion
                self.session.openWithCallback(
                    self.startUpdate, MessageBox,
                    _("Your current Version is " + str(installedVersion) +
                      "\nUpdate to revision " + str(latestVersion) +
                      " found!\n\nDo you want to update now?"),
                    MessageBox.TYPE_YESNO)

            else:
                self.session.openWithCallback(self.close, MessageBox,
                                              _("No update available"),
                                              MessageBox.TYPE_INFO)

        else:
            self.session.openWithCallback(
                self.close, MessageBox,
                _("No internet connection available or curl is not installed!"
                  ), MessageBox.TYPE_INFO)

        printl("", self, "C")
Beispiel #9
0
	def getText(self):
		printl("", self, "S")
		
		content = ""
		content += "Information\n\n"
		content += "DreamPlex - a plex client for Enigma2 \n" 
		content += "Version: \t" + getVersion() + "\n\n"
		content += "Autor: \t DonDavici\n"
		content += "\n"
		content += "Contributors: \t wezhunter\n"
		content += "\t andyblac \n"
		content += "\n"
		content += "Skinner: \t IPMAN\n"
		content += "\n\nIf you like my work you can buy me a beer :-) \n\[email protected]"
		
		printl("", self, "C")
		return content
Beispiel #10
0
    def getText(self):
        printl("", self, "S")

        content = ""
        content += "Information\n\n"
        content += "DreamPlex - a plex client for Enigma2 \n"
        content += "Version: \t" + getVersion() + "\n\n"
        content += "Autor: \t DonDavici\n"
        content += "\n"
        content += "Contributors: \t wezhunter\n"
        content += "\t andyblac \n"
        content += "\n"
        content += "Skinner: \t IPMAN\n"
        content += "\n\nIf you like my work you can buy me a beer :-) \n\[email protected]"

        printl("", self, "C")
        return content
Beispiel #11
0
	def startDeamon(self):
		printl("", self, "S")

		t = Thread(target=runHttp)
		t.start()

		client = PlexGdm(debug=3)
		version = str(getVersion())
		gBoxType = getBoxInformation()
		clientBox = "8000"
		printl("clientBox: " + str(gBoxType), self, "D")
		client.clientDetails(clientBox, "192.168.45.80", "8000", "DreamPlex", version)
		client.start_registration()

		if client.check_client_registration():
			printl("Successfully registered", self, "D")
		else:
			printl("Unsuccessfully registered", self, "D")

		printl("", self, "C")
Beispiel #12
0
    def startDeamon(self):
        printl("", self, "S")

        t = Thread(target=runHttp)
        t.start()

        client = PlexGdm(debug=3)
        version = str(getVersion())
        gBoxType = getBoxInformation()
        clientBox = "8000"
        printl("clientBox: " + str(gBoxType), self, "D")
        client.clientDetails(clientBox, "192.168.45.80", "8000", "DreamPlex", version)
        client.start_registration()

        if client.check_client_registration():
            printl("Successfully registered", self, "D")
        else:
            printl("Unsuccessfully registered", self, "D")

        printl("", self, "C")
Beispiel #13
0
	def checkForUpdate(self, silent=False):
		printl("", self, "S")
		self.package = "python-pyopenssl"

		if testInetConnectivity() and self.checkInstallationState(True):
			printl( "Starting request", self, "D")

			conn = httplib.HTTPSConnection("api.github.com",timeout=10, port=443)
			conn.request(url="/repos/DonDavici/DreamPlex/tags", method="GET", headers=getUserAgentHeader())
			data = conn.getresponse()
			self.response = data.read()

			printl("response: " + str(self.response), self, "D")
			starter = 19
			closer = self.response.find('",', 0, 50)
			printl("closer: " + str(closer), self, "D")
			latestVersion = self.response[starter:closer] # is a bit dirty but better than forcing users to install simplejson
			printl("latestVersion: " + str(latestVersion), self, "D")

			installedVersion = getVersion()
			printl("InstalledVersion: " + str(installedVersion), self, "D")

			isBeta = self.checkIfBetaVersion(latestVersion)
			printl("isBeta: " + str(isBeta), self, "D")

			if config.plugins.dreamplex.updateType.value == "1" and isBeta == True: # Stable
				latestVersion = self.searchLatestStable()

			if latestVersion > installedVersion:
				self.latestVersion = latestVersion
				self.session.openWithCallback(self.startUpdate, MessageBox,_("Your current Version is " + str(installedVersion) + "\nUpdate to revision " + str(latestVersion) + " found!\n\nDo you want to update now?"), MessageBox.TYPE_YESNO)

			else:
				if not silent:
					self.session.openWithCallback(self.close, MessageBox,_("No update available"), MessageBox.TYPE_INFO)

		else:
			if not silent:
				self.session.openWithCallback(self.close, MessageBox,_("No internet connection available or openssl is not installed!"), MessageBox.TYPE_INFO)

		printl("", self, "C")
Beispiel #14
0
    def keyRed(self):
        printl("", self, "S")

        client = PlexGdm(debug=3)
        version = str(getVersion())
        gBoxType = getBoxInformation()
        clientBox = gBoxType[1]
        printl("clientBox: " + str(gBoxType), self, "D")
        client.clientDetails(clientBox, "DreamPlex Client", "3003",
                             "DreamPlex", version)

        client.start_discovery()
        while not client.discovery_complete:
            print "Waiting for results"
            time.sleep(1)

        client.stop_discovery()
        serverList = client.getServerList()
        printl("serverList: " + str(serverList), self, "D")

        menu = []
        for server in serverList:
            printl("server: " + str(server), self, "D")
            menu.append((
                str(server.get("serverName")) + " (" +
                str(server.get("server")) + ":" + str(server.get("port")) +
                ")",
                server,
            ))

        printl("menu: " + str(menu), self, "D")
        self.session.openWithCallback(self.useSelectedServerData,
                                      ChoiceBox,
                                      title=_("Select server"),
                                      list=menu)

        printl("", self, "C")
Beispiel #15
0
	def checkForUpdate(self):
		printl("", self, "S")
		
		if testInetConnectivity():
			printl( "Starting request", self, "D")
			curl_string = 'curl -s -k "%s"' % "https://api.github.com/repos/DonDavici/DreamPlex/tags"
			
			printl("curl_string: " + str(curl_string), self, "D")
			self.response = popen(curl_string).read()
			printl("response: " + str(self.response), self, "D")
			starter = 19
			closer = self.response.find('",', 0, 50)
			printl("closer: " + str(closer), self, "D")
			latestVersion = self.response[starter:closer] # is a bit dirty but better than forcing users to install simplejson
			printl("latestVersion: " + str(latestVersion), self, "D")
			
			installedVersion = getVersion()
			printl("InstalledVersion: " + str(installedVersion), self, "D")
			
			isBeta = self.checkIfBetaVersion(latestVersion)
			printl("isBeta: " + str(isBeta), self, "D")
			
			if config.plugins.dreamplex.updateType.value == "1" and isBeta == True: # Stable
				latestVersion = self.searchLatestStable()
			
			if latestVersion > installedVersion:
				self.latestVersion = latestVersion
				self.session.openWithCallback(self.startUpdate, MessageBox,_("Your current Version is " + str(installedVersion) + "\nUpdate to revision " + str(latestVersion) + " found!\n\nDo you want to update now?"), MessageBox.TYPE_YESNO)

			else:
				self.session.openWithCallback(self.close, MessageBox,_("No update available"), MessageBox.TYPE_INFO)

		else:
			self.session.openWithCallback(self.close, MessageBox,_("No internet connection available!"), MessageBox.TYPE_INFO)
		
		printl("", self, "C")
Beispiel #16
0
# The suffix of source filenames.
source_suffix = ".rst"

# The master toctree document.
master_doc = "index"

# General information about the project.
project = u"abclinuxuapi"
copyright = u"2015 Bystroushaak"

# The full version, including alpha/beta/rc tags.
try:
    # read data from CHANGES.rst
    from __init__ import getVersion
    release = getVersion(open("../CHANGES.rst").read())
except Exception:
    # this is here specially for readthedocs, which downloads only docs, not
    # other files
    fh = urllib.urlopen("https://pypi.python.org/pypi/" + project + "/")
    release = filter(lambda x: "<title>" in x, fh.read().splitlines())
    release = release[0].split(":")[0].split()[1]

# The short X.Y version.
version = ".".join(release.split(".")[:2])

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]

# The name of the Pygments (syntax highlighting) style to use.
Beispiel #17
0
# The suffix of source filenames.
source_suffix = ".rst"

# The master toctree document.
master_doc = "index"

# General information about the project.
project = u"abclinuxuapi"
copyright = u"2015 Bystroushaak"

# The full version, including alpha/beta/rc tags.
try:
    # read data from CHANGES.rst
    from __init__ import getVersion
    release = getVersion(open("../CHANGES.rst").read())
except Exception:
    # this is here specially for readthedocs, which downloads only docs, not
    # other files
    fh = urllib.urlopen("https://pypi.python.org/pypi/" + project + "/")
    release = filter(lambda x: "<title>" in x, fh.read().splitlines())
    release = release[0].split(":")[0].split()[1]

# The short X.Y version.
version = ".".join(release.split(".")[:2])

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]

# The name of the Pygments (syntax highlighting) style to use.