Ejemplo n.º 1
0
	def createSatellitesXMLfile(self, tp_list, save_xml_dir) :
		pos = self.orb_position
		if pos > 1800 :
			pos -= 3600
		if pos < 0 :
			pos_name = '%dW' % (abs(int(pos))/10)
		else :
			pos_name = '%dE' % (abs(int(pos))/10)
		location = '%s/dmm_blindscan_%s_%s.xml' %(save_xml_dir, pos_name, strftime("%d-%m-%Y_%H-%M-%S"))
		tuner = nimmanager.nim_slots[self.feid].friendly_full_description
		xml = ['<?xml version="1.0" encoding="iso-8859-1"?>\n\n']
		xml.append('<!--\n')
		xml.append('	File created on %s\n' % (strftime("%A, %d of %B %Y, %H:%M:%S")))
		try:
			xml.append('	using %s receiver running Enigma2 image, version %s,\n' % (boxtype, about.getEnigmaVersionString()))
			xml.append('	image %s, with the Blind scan plugin\n\n' % (about.getImageTypeString()))
		except:
			xml.append('	using %s receiver running Enigma2 image (%s), with the Dreambox blind scan plugin\n\n' % (boxtype, tuner))
		xml.append('-->\n\n')
		xml.append('<satellites>\n')
		xml.append('	<sat name="%s" flags="0" position="%s">\n' % (self.sat_name.replace('&', '&amp;'), self.orb_position))
		for tp in tp_list:
			xml.append('		<transponder frequency="%d" symbol_rate="%d" polarization="%d" fec_inner="%d" system="%d" modulation="%d"/>\n' % (tp.frequency, tp.symbol_rate, tp.polarisation, tp.fec, tp.system, tp.modulation))
		xml.append('	</sat>\n')
		xml.append('</satellites>')
		f = open(location, "w")
		f.writelines(xml)
		f.close()
		return location
Ejemplo n.º 2
0
    def __init__(self, session):
        Screen.__init__(self, session)
        MEVer = 'Mediasat'
        f = open('/etc/MEversion', 'r')
        MEVer = f.readline().strip()
        f.close()
        MERev = ''
        f = open('/etc/MErev', 'r')
        MERev = f.readline().strip()
        f.close()
        self['EnigmaVersion'] = StaticText('Firmware: ' + MEVer + ' ' + MERev)
        self['ImageVersion'] = StaticText('Build: ' + about.getEnigmaVersionString())
        self['DriverVersion'] = StaticText(_('DVB drivers: ') + self.getDriverInstalledDate())
        self['KernelVersion'] = StaticText(_('Kernel version: ') + self.getKernelVersionString())
        self['FPVersion'] = StaticText('Team Homesite: media-sat.net')
        self['Devlopement'] = StaticText('Coder: Redouane')
        self['CpuInfo'] = StaticText(_('CPU: ') + self.getCPUInfoString())
        self['TunerHeader'] = StaticText(_('Detected NIMs:'))
        nims = nimmanager.nimList()
        for count in (0, 1, 2, 3):
            if count < len(nims):
                self['Tuner' + str(count)] = StaticText(nims[count])
            else:
                self['Tuner' + str(count)] = StaticText('')

        self['HDDHeader'] = StaticText(_('Detected HDD:'))
        hddlist = harddiskmanager.HDDList()
        hdd = hddlist and hddlist[0][1] or None
        if hdd is not None and hdd.model() != '':
            self['hddA'] = StaticText(_('%s\n(%s, %d MB free)') % (hdd.model(), hdd.capacity(), hdd.free()))
        else:
            self['hddA'] = StaticText(_('none'))
        self['actions'] = ActionMap(['SetupActions', 'ColorActions'], {'cancel': self.close,
         'ok': self.close})
Ejemplo n.º 3
0
	def __init__(self, session):
		Screen.__init__(self, session)

		
		AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
		AboutText += _("Image: ") + about.getImageTypeString() + "\n"
		AboutText += _("Kernel Version: ") + about.getKernelVersionString() + "\n"

		
		EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += EnigmaVersion + "\n"
		
		ImageVersion = _("Last Upgrade: ") + about.getImageVersionString()
		self["ImageVersion"] = StaticText(ImageVersion)
		AboutText += ImageVersion + "\n"

		# [iq
		AboutText += _("Powered by 4D") + "\n"
		# iq]

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		AboutText += "\n" + _("Detected NIMs:") + "\n"

		nims = nimmanager.nimList()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		AboutText += "\n" + _("Detected HDD:") + "\n"

		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024, _("free"))
				else:
					hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo
		self["AboutScrollLabel"] = ScrollLabel(AboutText)

		self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"], 
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			})
Ejemplo n.º 4
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Latest Commits"))
		self.skinName = ["CommitInfo", "About"]
		self["AboutScrollLabel"] = ScrollLabel(_("Please wait"))

		self["actions"] = ActionMap(["SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown,
				"left": self.left,
				"right": self.right
			})

		self["key_red"] = Button(_("Cancel"))

		# get the branch to display from the Enigma version
		try:
			branch = "?sha=" + "-".join(about.getEnigmaVersionString().split("-")[3:])
		except:
			branch = ""

		self.project = 0
		self.projects = [
			("https://api.github.com/repos/Openeight/enigma2/commits", "enigma2"),
			("https://api.github.com/repos/Openeight/SmartLiteFHD/commits", "SmartLiteFHD"),
			("https://api.github.com/repos/Openeight/SmartLiteSD/commits", "SmartLiteSD"),
		]
		self.cachedProjects = {}
		self.Timer = eTimer()
		self.Timer.callback.append(self.readGithubCommitLogs)
		self.Timer.start(50, True)
Ejemplo n.º 5
0
def getInfo():
	try:
		from Tools.HardwareInfoVu import HardwareInfoVu
		DeviceName = HardwareInfoVu().get_device_name()
	except:
		try:
			from Tools.HardwareInfo import HardwareInfo
			DeviceName = HardwareInfo().get_device_name()
		except:
			try:
				file = open("/proc/stb/info/model", "r")
				DeviceName = file.readline().strip()
				file.close()
			except:
				DeviceName = "unknown"

	BoxID = getMac()

	try:
		from Components.About import about
		EnigmaVersion = about.getEnigmaVersionString()
		ImageVersion = about.getVersionString()
	except:
		EnigmaVersion = "unknown"
		ImageVersion = "unknown"

	Hash = hashlib.sha512(BoxID.lower()).hexdigest().lower()
	OUI = BoxID[0:8]

	return [DeviceName, Hash, OUI, EnigmaVersion, ImageVersion]
Ejemplo n.º 6
0
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		from WebComponents.Sources.About import About
		from WebComponents.Sources.Frontend import Frontend
		from WebComponents.Sources.Hdd import Hdd
		from WebComponents.Sources.Network import Network
		from Components.config import config
		from Components.About import about
		from Components.Sources.StaticText import StaticText
		try:
			from Tools.StbHardware import getFPVersion
		except:
			from Tools.DreamboxHardware import getFPVersion
		from Tools.HardwareInfo import HardwareInfo

		hw = HardwareInfo()

		self["About"] = About(session)

		self["Network"] = Network()
		self["Hdd"] = Hdd()
		self["Frontends"] = Frontend()
		try:
			from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
			self["EnigmaVersion"] = StaticText(getEnigmaVersionString())
			self["ImageVersion"] = StaticText(getVersionString() + '.' + getBuildVersionString())
		except:
			self["EnigmaVersion"] = StaticText(about.getEnigmaVersionString())
			self["ImageVersion"] = StaticText(about.getVersionString())
		self["WebIfVersion"] = StaticText(config.plugins.Webinterface.version.value)
		self["FpVersion"] = StaticText(str(getFPVersion()))
		self["DeviceName"] = StaticText(hw.get_device_name())
Ejemplo n.º 7
0
	def updateInfo(self):
		rc = system("df -h > /tmp/syinfo.tmp")
		text = _("BOX\n") + _("Brand:") + "\tGOLDEN MEDIA\n"
		f = open("/proc/stb/info/boxtype",'r')
 		text += _("Model:\t") + f.readline()
 		f.close()
#		f = open("/proc/stb/info/chipset",'r')
# 		text += _("Chipset:\t") + f.readline() +"\n"
#		f.close()
		text += _("MEMORY\n")
		memTotal = memFree = swapTotal = swapFree = 0
		for line in open("/proc/meminfo",'r'):
			parts = line.split(':')
			key = parts[0].strip()
			if key == "MemTotal":
				memTotal = parts[1].strip()
			elif key in ("MemFree", "Buffers", "Cached"):
				memFree += int(parts[1].strip().split(' ',1)[0])
			elif key == "SwapTotal":
				swapTotal = parts[1].strip()
			elif key == "SwapFree":
				swapFree = parts[1].strip()
		text += _("Total memory:") + "\t%s\n" % memTotal
		text += _("Free memory:") + "\t%s kB\n"  % memFree
		text += _("Swap total:") + "\t%s \n"  % swapTotal
		text += _("Swap free:") + "\t%s \n"  % swapFree
		text += "\n" + _("STORAGE") + "\n"
		f = open("/tmp/syinfo.tmp",'r')
		line = f.readline()
		parts = line.split()
		text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
		line = f.readline()
		parts = line.split()
		text += _("Flash") + "\t" + parts[1].strip() + "  " + parts[2].strip()  + "  " +  parts[3].strip()  + "  " +  parts[4] + "\n"
 		for line in f.readlines():
			if line.find('/media/') != -1:
				line = line.replace('/media/', '   ')
				parts = line.split()
				if len(parts) == 6:
					text += parts[5] + "\t" + parts[1].strip() + "  " + parts[2].strip() + "  " + parts[3].strip() + "  " + parts[4] + "\n"
		f.close()
		os_remove("/tmp/syinfo.tmp")
		
		text += "\n" + _("SOFTWARE") + "\n"
#		f = open("/etc/bhversion",'r')
#		text += "Firmware v.:\t" + f.readline()
#        	f.close()
		text += "Enigma2 v.: \t" +  about.getEnigmaVersionString() + "\n"
		text += "Kernel v.: \t" +  about.getKernelVersionString() + "\n"
		
		text += "\n" + _("FIRMWARE") + "\n"
                text += "Image v.: \t" +  about.getImageTypeString() + "\n"
#		text += "OpenGl v.: \t" +  _("GLS 2.0 ") + "\n"
                text += "OE CORE v.: \t" +  _("OPENPLI 5.0 ") + "\n"
                text += "CODER N.: \t" +  _("SODO ") + "\n"
                text += "BETA TESTER N.1: \t" +  _("YOUSSEF EL-ARABI ") + "\n"
                text += "BETA TESTER N.2: \t" +  _("POP-AZERTY ") + "\n"
		
		self["lab1"].setText(text)
Ejemplo n.º 8
0
	def __init__(self, session):
		Screen.__init__(self, session)

		bhVer = "Black Hole"
		f = open("/etc/bhversion",'r')
		bhVer = f.readline().strip()
		f.close()
		
		bhRev = ""
		f = open("/etc/bhrev",'r')
		bhRev = f.readline().strip()
		f.close()
		
#		bhCod = "SODO"
#		f = open("/etc/bhcoder",'r')
#		bhVer = f.readline().strip()
#		f.close()
		

		self["EnigmaVersion"] = StaticText("Firmware: " + bhVer + " " + bhRev)
#		self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())
		
		self["ImageVersion"] = StaticText("Build: " + about.getEnigmaVersionString())
		driverdate = self.getDriverInstalledDate()
		if driverdate == "unknown":
			driverdate = self.getDriverInstalledDate_proxy()
		self["DriverVersion"] =  StaticText(_("DVB drivers: ") + driverdate)
		self["KernelVersion"] =  StaticText(_("Kernel version: ") + self.getKernelVersionString())
		
		self["FPVersion"] = StaticText("Team Homesite: vuplus-community.net")
#		self["COder"] = StaticText("Devlopeur: " + bhCod)
		
		self["CpuInfo"] =  StaticText(_("CPU: ") + self.getCPUInfoString())
		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		
		


		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		hddlist = harddiskmanager.HDDList()
		hdd = hddlist and hddlist[0][1] or None
		if hdd is not None and hdd.model() != "":
			self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
		else:
			self["hddA"] = StaticText(_("none"))

		self["actions"] = ActionMap(["SetupActions", "ColorActions"], 
			{
				"cancel": self.close,
				"ok": self.close,
			})
Ejemplo n.º 9
0
	def updateStatus(self):
		print "[TVCharts] Status Update ..."
		self.DBStatusTimer.stop()

		if not config.plugins.tvcharts.enabled.value or Screens.Standby.inStandby:
			return

		# Get Channelname
		sref = self.session.nav.getCurrentlyPlayingServiceReference()
		if sref is not None:
			ref = eServiceReference(sref.toString())
			ref.setName("")
			serviceHandler = eServiceCenter.getInstance()
			info = serviceHandler.info(ref)
			channel_name = info and info.getName(ref).replace('\xc2\x86', '').replace('\xc2\x87', '').decode("utf-8", "ignore").encode("utf-8") or ""
			self.serviceref = ref.toString()
		else:
			channel_name = ""
			self.serviceref = ""

		# Get Event Info
		service = self.session.nav.getCurrentService()
		info = service and service.info()
		event = info and info.getEvent(0)
		event_name = event and event.getEventName() or ""
		event_description = ""
		event_begin = 0

		if event is not None:
			curEvent = parseEvent(event)
			event_begin = int(curEvent[0])+(config.recording.margin_before.value*60)
			event_description = event.getExtendedDescription()

		# Get Box Info
		self.BoxID = iNetwork.getAdapterAttribute("eth0", "mac")
		self.DeviceName = HardwareInfo().get_device_name()
		self.EnigmaVersion = about.getEnigmaVersionString()
		self.ImageVersion = about.getVersionString()

		# Get TimerList
		self.timerlist = ""
		if config.plugins.tvcharts.submittimers.value and self.LastTimerlistUpdate <= (time()-1800):
			self.LastTimerlistUpdate = time()
			try:
				for timer in self.recordtimer.timer_list:
					if timer.disabled == 0 and timer.justplay == 0:
						self.timerlist += "%s|%s|%s|%s|%s|%s\n" % (timer.eit,str(int(timer.begin)+(config.recording.margin_before.value*60)), str(int(timer.end)-(config.recording.margin_after.value*60)), str(timer.service_ref), timer.name, timer.service_ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '').decode("utf-8", "ignore").encode("utf-8"))
			except Exception:
				print "[TVCharts] Error loading timers!"

		# Status Update
		getPage(url='http://www.dreambox-plugins.de/feeds/TVCharts/status.php', method='POST', headers={'Content-Type':'application/x-www-form-urlencoded'}, postdata=urlencode({'boxid' : self.BoxID, 'devicename' : self.DeviceName, 'imageversion' : self.ImageVersion, 'enigmaversion' : self.EnigmaVersion, 'lastchannel' : channel_name, 'lastevent' : event_name, 'eventdescr' : event_description, 'lastbegin' : event_begin, 'lastserviceref' : self.serviceref, 'timerlist' : self.timerlist})).addErrback(self.updateError)

		# Restart Timer
		self.DBStatusTimer.start(900000, True)
Ejemplo n.º 10
0
	def updateInfo(self):
		rc = system("df -h > /tmp/syinfo.tmp")
		text = "BOX\n"
		f = open("/proc/stb/info/model",'r')
 		text += "Model:\t" + f.readline()
 		f.close()
#		f = open("/proc/stb/info/chipset",'r')
# 		text += "Chipset:\t" + about.getChipSetString() + "\n"
# 		f.close()
		text += "\nMEMORY\n"
		memTotal = memFree = swapTotal = swapFree = 0
		for line in open("/proc/meminfo",'r'):
			parts = line.split(':')
			key = parts[0].strip()
			if key == "MemTotal":
				memTotal = parts[1].strip()
			elif key in ("MemFree", "Buffers", "Cached"):
				memFree += int(parts[1].strip().split(' ',1)[0])
			elif key == "SwapTotal":
				swapTotal = parts[1].strip()
			elif key == "SwapFree":
				swapFree = parts[1].strip()
		text += "Total memory:\t%s\n" % memTotal
		text += "Free memory:\t%s kB\n"  % memFree
		text += "Swap total:\t%s \n"  % swapTotal
		text += "Swap free:\t%s \n"  % swapFree
		text += "\nSTORAGE\n"
		f = open("/tmp/syinfo.tmp",'r')
		line = f.readline()
		parts = line.split()
		text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
		line = f.readline()
		parts = line.split()
		text += "Flash" + "\t" + parts[1].strip() + "  " + parts[2].strip()  + "  " +  parts[3].strip()  + "  " +  parts[4] + "\n"
 		for line in f.readlines():
			if line.find('/media/') != -1:
				line = line.replace('/media/', '   ')
				parts = line.split()
				if len(parts) == 6:
					text += parts[5] + "\t" + parts[1].strip() + "  " + parts[2].strip() + "  " + parts[3].strip() + "  " + parts[4] + "\n"
		f.close()
		os_remove("/tmp/syinfo.tmp")
		
		text += "\nSOFTWARE\n"
		f = open("/etc/ldversion",'r')
		text += "Firmware: \t" + f.readline() + "\n"
		f.close()
		text += "Version: \t" +  about.getEnigmaVersionString() + "\n"
		text += "Kernel: \t" +  about.getKernelVersionString() + "\n"
		
		self["lab1"].setText(text)
		
Ejemplo n.º 11
0
	def getImageVersionString(cls):
		from Components.About import about

		creator = "n/a"
		version = "n/a"

		if hasattr(about,'getVTiVersionString'):
			creator = about.getVTiVersionString()
		else:
			creator = about.getEnigmaVersionString()
		version = about.getVersionString()

		return ' / '.join((creator, version))
def getInstance():
	global instance
	
	if instance is None:
		
		initLog()
		
		from plugin import VERSION
		
		logDebug(" SERIESPLUGIN NEW INSTANCE " + VERSION)
		
		try:
			from Tools.HardwareInfo import HardwareInfo
			logDebug( " DeviceName " + HardwareInfo().get_device_name().strip() )
		except:
			sys.exc_clear()
		
		try:
			from Components.About import about
			logDebug( " EnigmaVersion " + about.getEnigmaVersionString().strip() )
			logDebug( " ImageVersion " + about.getVersionString().strip() )
		except:
			sys.exc_clear()
		
		try:
			#http://stackoverflow.com/questions/1904394/python-selecting-to-read-the-first-line-only
			logDebug( " dreamboxmodel " + open("/proc/stb/info/model").readline().strip() )
			logDebug( " imageversion " + open("/etc/image-version").readline().strip() )
			logDebug( " imageissue " + open("/etc/issue.net").readline().strip() )
		except:
			sys.exc_clear()
		
		try:
			for key, value in config.plugins.seriesplugin.dict().iteritems():
				logDebug( " config..%s = %s" % (key, str(value.value)) )
		except Exception as e:
			sys.exc_clear()
		
		global CompiledRegexpReplaceChars
		try:
			if config.plugins.seriesplugin.replace_chars.value:
				CompiledRegexpReplaceChars = re.compile('['+config.plugins.seriesplugin.replace_chars.value.replace("\\", "\\\\\\\\")+']')
		except:
			logInfo( " Config option 'Replace Chars' is no valid regular expression" )
			CompiledRegexpReplaceChars = re.compile("[:\!/\\,\(\)'\?]")
		
		instance = SeriesPlugin()
		
		logDebug( " ", strftime("%a, %d %b %Y %H:%M:%S", localtime()) )
	
	return instance
Ejemplo n.º 13
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("Latest Commits"))
        self.skinName = ["CommitInfo", "About"]
        self["AboutScrollLabel"] = ScrollLabel(_("Please wait"))

        self["actions"] = ActionMap(
            ["SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown,
                "left": self.left,
                "right": self.right
            })

        self["key_red"] = Button(_("Cancel"))

        # get the branch to display from the Enigma version
        try:
            branch = "?sha=" + "-".join(
                about.getEnigmaVersionString().split("-")[3:])
        except:
            branch = ""

        self.project = 0
        self.projects = [
            ("https://api.github.com/repos/openpli/enigma2/commits" + branch,
             "Enigma2"),
            ("https://api.github.com/repos/openpli/openpli-oe-core/commits" +
             branch, "Openpli Oe Core"),
            ("https://api.github.com/repos/openpli/enigma2-plugins/commits",
             "Enigma2 Plugins"),
            ("https://api.github.com/repos/openpli/aio-grab/commits",
             "Aio Grab"),
            ("https://api.github.com/repos/openpli/enigma2-plugin-extensions-epgimport/commits",
             "Plugin EPGImport"),
            ("https://api.github.com/repos/openpli/enigma2-plugin-skins-magic/commits",
             "Skin Magic SD"),
            ("https://api.github.com/repos/littlesat/skin-PLiHD/commits",
             "Skin PLi HD"),
            ("https://api.github.com/repos/E2OpenPlugins/e2openplugin-OpenWebif/commits",
             "OpenWebif"),
            ("https://api.github.com/repos/haroo/HansSettings/commits",
             "Hans settings")
        ]
        self.cachedProjects = {}
        self.Timer = eTimer()
        self.Timer.callback.append(self.readGithubCommitLogs)
        self.Timer.start(50, True)
Ejemplo n.º 14
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("Latest Commits"))
        self.skinName = ["CommitInfo", "About"]
        self["AboutScrollLabel"] = ScrollLabel(_("Please wait"))

        self["actions"] = ActionMap(
            ["SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown,
                "left": self.left,
                "right": self.right
            })

        self["key_red"] = Button(_("Cancel"))

        # get the branch to display from the Enigma version
        try:
            branch = "?sha=" + "-".join(
                about.getEnigmaVersionString().split("-")[3:])
        except:
            branch = ""

        self.project = 0
        self.projects = [
            ("https://api.github.com/repos/OpenVisionE2/enigma2-openvision/commits"
             + branch, "Enigma2 - Vision"),
            ("https://api.github.com/repos/OpenVisionE2/openvision-oe/commits",
             "OE - Vision 7.x"),
            ("https://api.github.com/repos/OpenVisionE2/openvision-development-platform/commits",
             "OE - Vision 9.x"),
            ("https://api.github.com/repos/openpli/servicemp3/commits",
             "Service MP3"),
            ("https://api.github.com/repos/OpenVisionE2/gstreamer1.0-plugin-multibox-dvbmediasink/commits",
             "DVB MediaSink"),
            ("https://api.github.com/repos/OpenVisionE2/enigma2-plugins/commits",
             "Enigma2 Plugins"),
            ("https://api.github.com/repos/OpenVisionE2/alliance-plugins/commits",
             "Alliance Plugins"),
            ("https://api.github.com/repos/OpenVisionE2/OpenWebif/commits",
             "Open WebIF"),
            ("https://api.github.com/repos/OpenVisionE2/BackupSuite/commits",
             "Backup Suite")
        ]
        self.cachedProjects = {}
        self.Timer = eTimer()
        self.Timer.callback.append(self.readGithubCommitLogs)
        self.Timer.start(50, True)
Ejemplo n.º 15
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self["EnigmaVersion"] = StaticText("Enigma2: " + about.getEnigmaVersionString())
		self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %d") % fp_version

		self["FPVersion"] = StaticText(fp_version)

		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		hddlist = harddiskmanager.HDDList()
		hdd = hddlist and hddlist[0][1] or None
		if hdd is not None and hdd.model() != "":
			self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
		else:
			self["hddA"] = StaticText(_("none"))

		self["IPHeader"] = StaticText(_("Current IP Address:"))
		iNetwork = resourcemanager.getResource("iNetwork")
		ifaces = iNetwork.getConfiguredAdapters()
		convertIP = lambda l: "%s.%s.%s.%s" % tuple(l) if l and len(l) == 4 else "0.0.0.0"
		ipA = _("none")
		if len(ifaces) > 0:
			iface = ifaces[0]
			ip = iNetwork.getAdapterAttribute(iface, "ip")
			name = iNetwork.getFriendlyAdapterName(iface)
			if ip != None:
				ipA = "%s (%s)" %(convertIP(ip), name)
		self["ipA"] = StaticText(ipA)

		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo
			})
Ejemplo n.º 16
0
	def populate(self, bootLoaderInfo):
		self.list = []

		self.list.append(self.makeHeadingInfoEntry(_("Model:"), "%s %s" % (getMachineBrand(), getMachineName())))

		self.list.append(self.makeEmptyEntry())

		if path.exists('/proc/stb/info/chipset'):
			self.list.append(self.makeInfoEntry(_("Chipset:"), "BCM%s" % about.getChipSetString()))

		self.list.append(self.makeInfoEntry(_("CPU:"), about.getCPUString()))
		self.list.append(self.makeInfoEntry(_("CPU Speed:"), about.getCPUSpeedString()))
		self.list.append(self.makeInfoEntry(_("Cores:"), str(about.getCpuCoresString())))

		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		self.list.append(self.makeInfoEntry(_("Drivers:"), driversdate))
		self.list.append(self.makeInfoEntry(_("Image:"), about.getImageVersionString()))
		self.list.append(self.makeInfoEntry(_("Kernel:"), about.getKernelVersionString()))
		self.list.append(self.makeInfoEntry(_("Oe-Core:"), about.getEnigmaVersionString()))
		self.list.append(self.makeInfoEntry(_("Bootloader:"), bootLoaderInfo))

		fp_version = getFPVersion()
		if fp_version is not None:
			self.list.append(self.makeInfoEntry(_("Front Panel:"), "%d" % fp_version))

		self.list.append(self.makeEmptyEntry())
		self.list.append(self.makeInfoEntry(_("Last Upgrade:"), about.getLastUpdateString()))
		self.list.append(self.makeEmptyEntry())
		self.list.append(self.makeInfoEntry(_("WWW:"), about.getImageUrlString()))

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			tempinfo = file('/proc/stb/sensors/temp0/value').read()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			tempinfo = file('/proc/stb/fp/temp_sensor').read()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			self.list.append(self.makeInfoEntry(_("System temperature:"), tempinfo.replace('\n', '') + mark + "C"))

		self.list.append(self.makeInfoEntry(_("GStreamer:"), about.getGStreamerVersionString().replace("GStreamer", "").strip()))
		self.list.append(self.makeInfoEntry(_("Python:"), about.getPythonVersionString()))

		self["list"].updateList(self.list)
Ejemplo n.º 17
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self["EnigmaVersion"] = StaticText("Dreambox OS: " + about.getEnigmaVersionString())
		self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %d") % fp_version

		self["FPVersion"] = StaticText(fp_version)

		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		hddlist = harddiskmanager.HDDList()
		hdd = hddlist and hddlist[0][1] or None
		if hdd is not None and hdd.model() != "":
			self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
		else:
			self["hddA"] = StaticText(_("none"))

		self["IPHeader"] = StaticText(_("Current IP Address:"))

		ipA = _("none")
		services = eNetworkManager.getInstance().getServices()
		for service in services:
			ip = self.getServiceIP(service)
			name = service.name()
			if ip != None:
				ipA = "%s (%s)" %(ip, name)
		self["ipA"] = StaticText(ipA)
		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo
			})
Ejemplo n.º 18
0
 def populate(self):
     EGAMIVersion = _("EGAMI %s") % about.getImageVersionString()
     self["lab1"] = Label(EGAMIVersion)
     model = None
     AboutText = ""
     AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())
     if path.exists("/proc/stb/info/chipset"):
         AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString()
     AboutText += _("CPU:\t%s\n") % about.getCPUString()
     AboutText += _("CPU Speed:\t%s\n") % about.getCPUSpeedString()
     AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
     AboutText += _("Version:\t%s") % EGAMIVersion + "\n"
     AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"
     AboutText += _("Oe-Core:\t%s") % about.getEnigmaVersionString() + "\n"
     AboutText += _("Image Type:\t%s\n") % getImageType().title()
     AboutText += _("Image Coder:\tSODO\n")
     string = getDriverDate()
     year = string[0:4]
     month = string[4:6]
     day = string[6:8]
     driversdate = "-".join((year, month, day))
     AboutText += _("Drivers:\t%s") % driversdate + "\n"
     fp_version = getFPVersion()
     if fp_version is None:
         fp_version = ""
     elif fp_version != 0:
         fp_version = _("Front panel:\t%s") % str(fp_version)
         AboutText += fp_version + "\n"
     AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
     AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString().replace("GStreamer", "") + "\n\n"
     tempinfo = ""
     if path.exists("/proc/stb/sensors/temp0/value") and getBoxType() not in "gbquad":
         f = open("/proc/stb/sensors/temp0/value", "r")
         tempinfo = f.read()
         f.close()
     elif path.exists("/proc/stb/fp/temp_sensor") and getBoxType() not in "gbquad":
         f = open("/proc/stb/fp/temp_sensor", "r")
         tempinfo = f.read()
         f.close()
     if tempinfo and int(tempinfo.replace("\n", "")) > 0:
         mark = str("\xc2\xb0")
         AboutText += _("System temperature: %s") % tempinfo.replace("\n", "") + mark + "C\n\n"
     AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
     AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"
     AboutText += _("WWW:\t%s") % about.getImageUrlString()
     self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 19
0
 def populate(self):
     EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
     self['lab1'] = Label(EGAMIVersion)
     model = None
     AboutText = ''
     AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName())
     if path.exists('/proc/stb/info/chipset'):
         AboutText += _('Chipset:\tBCM%s\n') % about.getChipSetString()
     AboutText += _('CPU:\t%s\n') % about.getCPUString()
     AboutText += _('CPU Speed:\t%s\n') % about.getCPUSpeedString()
     AboutText += _('Cores:\t%s\n') % about.getCpuCoresString()
     AboutText += _('Version:\t%s') % EGAMIVersion + '\n'
     AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n'
     AboutText += _('Oe-Core:\t%s') % about.getEnigmaVersionString() + '\n'
     AboutText += _('Image Type:\t%s\n') % getImageType().title()
     AboutText += _('Coder:\tSODO') + '\n'
     string = getDriverDate()
     year = string[0:4]
     month = string[4:6]
     day = string[6:8]
     driversdate = '-'.join((year, month, day))
     AboutText += _('Drivers:\t%s') % driversdate + '\n'
     fp_version = getFPVersion()
     if fp_version is None:
         fp_version = ''
     elif fp_version != 0:
         fp_version = _('Front panel:\t%s') % str(fp_version)
         AboutText += fp_version + '\n'
     AboutText += _('Python:\t%s\n') % about.getPythonVersionString()
     AboutText += _('GStreamer:\t%s') % about.getGStreamerVersionString().replace('GStreamer', '') + '\n\n'
     tempinfo = ''
     if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in 'gbquad':
         f = open('/proc/stb/sensors/temp0/value', 'r')
         tempinfo = f.read()
         f.close()
     elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in 'gbquad':
         f = open('/proc/stb/fp/temp_sensor', 'r')
         tempinfo = f.read()
         f.close()
     if tempinfo and int(tempinfo.replace('\n', '')) > 0:
         mark = str('\xc2\xb0')
         AboutText += _('System temperature: %s') % tempinfo.replace('\n', '') + mark + 'C\n\n'
     AboutText += _('Installed:\t%s\n') % about.getFlashDateString()
     AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\n\n'
     AboutText += _('WWW:\t%s') % about.getImageUrlString()
     self['AboutScrollLabel'] = ScrollLabel(AboutText)
Ejemplo n.º 20
0
	def createSatellitesXMLfile(self, tp_list, save_xml_dir) :
		pos = self.orb_position
		if pos > 1800 :
			pos -= 3600
		if pos < 0 :
			pos_name = '%dW' % (abs(int(pos))/10)
		else :
			pos_name = '%dE' % (abs(int(pos))/10)
		location = '%s/blindscan_%s_%s.xml' %(save_xml_dir, pos_name, strftime("%d-%m-%Y_%H-%M-%S"))
		tuner = nimmanager.nim_slots[self.feid].friendly_full_description
		polarisation = ['horizontal', 'vertical', 'circular left', 'circular right', 'vertical and horizontal', 'circular right and circular left']
		adjacent = ['no', 'up to 1 degree', 'up to 2 degrees', 'up to 3 degrees']
		known_txp = 'no'
		if self.filter_off_adjacent_satellites.value :
			known_txp ='yes'
		xml = ['<?xml version="1.0" encoding="iso-8859-1"?>\n\n']
		xml.append('<!--\n')
		xml.append('	File created on %s\n' % (strftime("%A, %d of %B %Y, %H:%M:%S")))
		try:
			xml.append('	using %s receiver running Enigma2 image, version %s,\n' % (boxtype, about.getEnigmaVersionString()))
			xml.append('	image %s, with the blindscan plugin updated by Huevos\n\n' % (about.getImageTypeString()))
		except:
			xml.append('	using %s receiver running Enigma2 image, with the blindscan plugin updated by Huevos\n\n' % (boxtype))
		xml.append('	Search parameters:\n')
		xml.append('		%s\n' % (tuner))
		xml.append('		Satellite: %s\n' % (self.sat_name))
		xml.append('		Start frequency: %dMHz\n' % (self.blindscan_start_frequency.value))
		xml.append('		Stop frequency: %dMHz\n' % (self.blindscan_stop_frequency.value))
		xml.append('		Polarization: %s\n' % (polarisation[self.scan_sat.polarization.value]))
		xml.append('		Lower symbol rate: %d\n' % (self.blindscan_start_symbol.value * 1000))
		xml.append('		Upper symbol rate: %d\n' % (self.blindscan_stop_symbol.value * 1000))
		xml.append('		Only save unknown tranponders: %s\n' % (known_txp))
		xml.append('		Filter out adjacent satellites: %s\n' % (adjacent[self.filter_off_adjacent_satellites.value]))
		xml.append('-->\n\n')
		xml.append('<satellites>\n')
		xml.append('	<sat name="%s" flags="0" position="%s">\n' % (self.sat_name.replace('&', '&amp;'), self.orb_position))
		for tp in tp_list :
			xml.append('		<transponder frequency="%d" symbol_rate="%d" polarization="%d" fec_inner="%d" system="%d" modulation="%d"/>\n' % (tp.frequency, tp.symbol_rate, tp.polarisation, tp.fec, tp.system, tp.modulation))
		xml.append('	</sat>\n')
		xml.append('</satellites>')
		open(location, "w").writelines(xml)
		global XML_FILE
		self["yellow"].setText(_("Open xml file"))
		XML_FILE = location
		return location
Ejemplo n.º 21
0
    def __init__(self, session):
        Screen.__init__(self, session)

        bhVer = "Black Hole"
        f = open("/etc/bhversion", 'r')
        bhVer = f.readline().strip()
        f.close()

        #		bhRev = ""
        #		f = open("/etc/bhrev",'r')
        #		bhRev = f.readline().strip()
        #		f.close()

        self["EnigmaVersion"] = StaticText("Firmware: " + bhVer + " ")
        #		self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())

        self["ImageVersion"] = StaticText("Build: " +
                                          about.getEnigmaVersionString())

        self["FPVersion"] = StaticText("DevloPeur: ST7TEAM")

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))

        nims = nimmanager.nimList()
        for count in (0, 1, 2, 3):
            if count < len(nims):
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        hddlist = harddiskmanager.HDDList()
        hdd = hddlist and hddlist[0][1] or None
        if hdd is not None and hdd.model() != "":
            self["hddA"] = StaticText(
                _("%s\n(%s, %d MB free)") %
                (hdd.model(), hdd.capacity(), hdd.free()))
        else:
            self["hddA"] = StaticText(_("none"))

        self["actions"] = ActionMap(["SetupActions", "ColorActions"], {
            "cancel": self.close,
            "ok": self.close,
        })
Ejemplo n.º 22
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Latest Commits"))
		self.skinName = ["CommitInfo", "About"]
		self["AboutScrollLabel"] = ScrollLabel(_("Please wait"))

		self["actions"] = ActionMap(["SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown,
				"left": self.left,
				"right": self.right
			})

		self["key_red"] = Button(_("Cancel"))

		# get the branch to display from the Enigma version
		try:
			branch = "?sha=" + "-".join(about.getEnigmaVersionString().split("-")[3:])
		except:
			branch = ""

		if boxbranding.getVisionVersion().startswith("10"):
			oegiturl = "https://api.github.com/repos/OpenVisionE2/openvision-development-platform/commits"
		else:
			oegiturl = "https://api.github.com/repos/OpenVisionE2/openvision-oe/commits"

		self.project = 0
		self.projects = [
			("https://api.github.com/repos/OpenVisionE2/enigma2-openvision/commits" + branch, "Enigma2 - Vision"),
			(oegiturl, "OE - Vision"),
			("https://api.github.com/repos/OpenVisionE2/enigma2-plugins/commits", "Enigma2 plugins"),
			("https://api.github.com/repos/OpenVisionE2/alliance-plugins/commits", "Alliance plugins"),
			("https://api.github.com/repos/OpenVisionE2/OpenWebif/commits", "Open WebIF"),
			("https://api.github.com/repos/OpenVisionE2/openvision-core-plugin/commits", "Vision core plugin"),
			("https://api.github.com/repos/OpenVisionE2/BackupSuite/commits", "Backup Suite plugin"),
			("https://api.github.com/repos/OpenVisionE2/OctEtFHD-skin/commits", "OctEtFHD skin")
		]
		self.cachedProjects = {}
		self.Timer = eTimer()
		self.Timer.callback.append(self.readGithubCommitLogs)
		self.Timer.start(50, True)
Ejemplo n.º 23
0
	def __init__(self, session):
		Screen.__init__(self, session)

		bhVer = "Black Hole"
		f = open("/etc/bhversion",'r')
		bhVer = f.readline().strip()
		f.close()
		
#		bhRev = ""
#		f = open("/etc/bhrev",'r')
#		bhRev = f.readline().strip()
#		f.close()

		self["EnigmaVersion"] = StaticText("Firmware: " + bhVer + " ")
#		self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())
		
		self["ImageVersion"] = StaticText("Build: " + about.getEnigmaVersionString())
		
		self["FPVersion"] = StaticText("DevloPeur: ST7TEAM")
		
		self["TunerHeader"] = StaticText(_("Detected NIMs:"))


		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		hddlist = harddiskmanager.HDDList()
		hdd = hddlist and hddlist[0][1] or None
		if hdd is not None and hdd.model() != "":
			self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
		else:
			self["hddA"] = StaticText(_("none"))

		self["actions"] = ActionMap(["SetupActions", "ColorActions"], 
			{
				"cancel": self.close,
				"ok": self.close,
			})
Ejemplo n.º 24
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Latest Commits"))
		self.skinName = ["CommitInfo", "About"]
		self["AboutScrollLabel"] = ScrollLabel(_("Please wait"))

		self["actions"] = ActionMap(["SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown,
				"left": self.left,
				"right": self.right
			})

		self["key_red"] = Button(_("Cancel"))

		# get the branch to display from the Enigma version
		try:
			branch = "?sha=" + "-".join(about.getEnigmaVersionString().split("-")[3:])
		except:
			branch = ""

		self.project = 0
		self.projects = [
			("https://api.github.com/repos/openpli/enigma2/commits" + branch, "Enigma2 - PLi"),
			("https://api.github.com/repos/OpenVisionE2/enigma2-openvision-sh4/commits" + branch, "Enigma2 - SH4"),
			("https://api.github.com/repos/openpli/openpli-oe-core/commits" + branch, "OE - PLi"),
			("https://api.github.com/repos/OpenVisionE2/openvision-oe/commits" + branch, "OE - Vision"),
			("https://api.github.com/repos/OpenVisionE2/sh4-driver/commits", "SH4 Driver"),
			("https://api.github.com/repos/OpenVisionE2/servicemp3epl/commits", "Service MP3 EPlayer"),
			("https://api.github.com/repos/openpli/enigma2-plugins/commits", "Enigma2 Plugins"),
			("https://api.github.com/repos/OpenVisionE2/alliance-plugins/commits", "Alliance Plugins"),
			("https://api.github.com/repos/E2OpenPlugins/e2openplugin-OpenWebif/commits", "Open WebIF"),
			("https://api.github.com/repos/OpenVisionE2/BackupSuite/commits", "Backup Suite")
		]
		self.cachedProjects = {}
		self.Timer = eTimer()
		self.Timer.callback.append(self.readGithubCommitLogs)
		self.Timer.start(50, True)
    def __init__(self, session):
        Screen.__init__(self, session)

        self["EnigmaVersion"] = StaticText("Enigma: " +
                                           about.getEnigmaVersionString())
        self["ImageVersion"] = StaticText("Evolution: " +
                                          about.getImageVersionString())

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %d") % fp_version

        self["FPVersion"] = StaticText(fp_version)

        nims = nimmanager.nimList()
        for count in (0, 1, 2, 3):
            if count < len(nims):
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        hddlist = harddiskmanager.HDDList()
        hdd = hddlist and hddlist[0][1] or None
        if hdd is not None and hdd.model() != "":
            self["hddA"] = StaticText(
                _("%s\n(%s, %d MB free)") %
                (hdd.model(), hdd.capacity(), hdd.free()))
        else:
            self["hddA"] = StaticText(_("none"))

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions"], {
                "cancel": self.close,
                "ok": self.close,
                "green": self.showTranslationInfo
            })
  def __GetUserAgent(self):
    
    agents = {}
    agents["ShareMyBox"] = VERSION

    
    if hasattr(os,'uname'):
      agents["ShareMyBox"] += ' (%s)' % str(os.uname()).replace('(','').replace(')','')
      
    try:
      from Components.About import about
      agents["Enigma2"] = about.getEnigmaVersionString()
      agents["Image"] = about.getImageVersionString()
    except:
      pass      

    self.__headers['User-Agent'] = ''      
    for key, value in agents.iteritems():
      self.__headers['User-Agent'] += '%s/"%s" ' % (key, value)
      
    self.__headers['User-Agent'] = self.__headers['User-Agent'].strip()
Ejemplo n.º 27
0
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		from WebComponents.Sources.Network import Network
		from WebComponents.Sources.Hdd import Hdd
		from WebComponents.Sources.Frontend import Frontend
		from Components.config import config
		from Components.About import about
		from Components.Sources.StaticText import StaticText
		from Tools.DreamboxHardware import getFPVersion
		from Tools.HardwareInfo import HardwareInfo

		hw = HardwareInfo()

		self["Network"] = Network()
		self["Hdd"] = Hdd()
		self["Frontends"] = Frontend()
		self["EnigmaVersion"] = StaticText(about.getEnigmaVersionString())
		self["ImageVersion"] = StaticText(about.getVersionString())
		self["WebIfVersion"] = StaticText(config.plugins.Webinterface.version.value)
		self["FpVersion"] = StaticText(str(getFPVersion()))
		self["DeviceName"] = StaticText("\t%s %s\n" % (getMachineBrand(), getMachineName()))
Ejemplo n.º 28
0
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		from WebComponents.Sources.Network import Network
		from WebComponents.Sources.Hdd import Hdd
		from WebComponents.Sources.Frontend import Frontend
		from Components.config import config
		from Components.About import about
		from Components.Sources.StaticText import StaticText
		from Tools.DreamboxHardware import getFPVersion
		from Tools.HardwareInfo import HardwareInfo

		hw = HardwareInfo()

		self["Network"] = Network()
		self["Hdd"] = Hdd()
		self["Frontends"] = Frontend()
		self["EnigmaVersion"] = StaticText(about.getEnigmaVersionString())
		self["ImageVersion"] = StaticText(about.getVersionString())
		self["WebIfVersion"] = StaticText(config.plugins.Webinterface.version.value)
		self["FpVersion"] = StaticText(str(getFPVersion()))
		self["DeviceName"] = StaticText(hw.get_device_name())
Ejemplo n.º 29
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Latest Commits"))
		self.skinName = ["CommitInfo", "About"]
		self["AboutScrollLabel"] = ScrollLabel(_("Please wait"))

		self["actions"] = ActionMap(["SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown,
				"left": self.left,
				"right": self.right
			})

		self["key_red"] = Button(_("Cancel"))

		# get the branch to display from the Enigma version
		try:
			branch = "?sha=" + "-".join(about.getEnigmaVersionString().split("-")[3:])
		except:
			branch = ""

		self.project = 0
		self.projects = [
			("https://api.github.com/repos/openpli/enigma2/commits" + branch, "Enigma2"),
			("https://api.github.com/repos/openpli/openpli-oe-core/commits" + branch, "Openpli Oe Core"),
			("https://api.github.com/repos/openpli/enigma2-plugins/commits", "Enigma2 Plugins"),
			("https://api.github.com/repos/openpli/aio-grab/commits", "Aio Grab"),
			("https://api.github.com/repos/openpli/enigma2-plugin-extensions-epgimport/commits", "Plugin EPGImport"),
			("https://api.github.com/repos/openpli/enigma2-plugin-skins-magic/commits", "Skin Magic SD"),
			("https://api.github.com/repos/littlesat/skin-PLiHD/commits", "Skin PLi HD"),
			("https://api.github.com/repos/E2OpenPlugins/e2openplugin-OpenWebif/commits", "OpenWebif"),
			("https://api.github.com/repos/haroo/HansSettings/commits", "Hans settings")
		]
		self.cachedProjects = {}
		self.Timer = eTimer()
		self.Timer.callback.append(self.readGithubCommitLogs)
		self.Timer.start(50, True)
Ejemplo n.º 30
0
 def createSatellitesXMLfile(self, tp_list, save_xml_dir):
     pos = self.orb_position
     if pos > 1800:
         pos -= 3600
     if pos < 0:
         pos_name = '%dW' % (abs(int(pos)) / 10)
     else:
         pos_name = '%dE' % (abs(int(pos)) / 10)
     location = '%s/dmm_blindscan_%s_%s.xml' % (
         save_xml_dir, pos_name, strftime("%d-%m-%Y_%H-%M-%S"))
     tuner = nimmanager.nim_slots[self.feid].friendly_full_description
     xml = ['<?xml version="1.0" encoding="iso-8859-1"?>\n\n']
     xml.append('<!--\n')
     xml.append('	File created on %s\n' %
                (strftime("%A, %d of %B %Y, %H:%M:%S")))
     try:
         xml.append(
             '	using %s receiver running Enigma2 image, version %s,\n' %
             (boxtype, about.getEnigmaVersionString()))
         xml.append('	image %s, with the Blind scan plugin\n\n' %
                    (about.getImageTypeString()))
     except:
         xml.append(
             '	using %s receiver running Enigma2 image (%s), with the Dreambox blind scan plugin\n\n'
             % (boxtype, tuner))
     xml.append('-->\n\n')
     xml.append('<satellites>\n')
     xml.append('	<sat name="%s" flags="0" position="%s">\n' %
                (self.sat_name.replace('&', '&amp;'), self.orb_position))
     for tp in tp_list:
         xml.append(
             '		<transponder frequency="%d" symbol_rate="%d" polarization="%d" fec_inner="%d" system="%d" modulation="%d"/>\n'
             % (tp.frequency, tp.symbol_rate, tp.polarisation, tp.fec,
                tp.system, tp.modulation))
     xml.append('	</sat>\n')
     xml.append('</satellites>')
     f = open(location, "w")
     f.writelines(xml)
     f.close()
     return location
Ejemplo n.º 31
0
    def __init__(self, session, request):
        WebScreen.__init__(self, session, request)
        from .WebComponents.Sources.About import About
        from .WebComponents.Sources.Frontend import Frontend
        from .WebComponents.Sources.Hdd import Hdd
        from .WebComponents.Sources.Network import Network
        from Components.config import config
        from Components.About import about
        from Components.Sources.StaticText import StaticText
        try:
            from Tools.StbHardware import getFPVersion
        except:
            from Tools.DreamboxHardware import getFPVersion
        from Tools.HardwareInfo import HardwareInfo

        hw = HardwareInfo()

        self["About"] = About(session)

        self["Network"] = Network()
        self["Hdd"] = Hdd()
        self["Frontends"] = Frontend()
        try:
            from enigma import getEnigmaVersionString
            from boxbranding import getImageVersion, getImageBuild
            self["EnigmaVersion"] = StaticText(getEnigmaVersionString())
            self["ImageVersion"] = StaticText(getImageVersion() + '.' +
                                              getImageBuild())
        except:
            self["EnigmaVersion"] = StaticText(about.getEnigmaVersionString())
            self["ImageVersion"] = StaticText(about.getVersionString())
        self["WebIfVersion"] = StaticText(
            config.plugins.Webinterface.version.value)
        self["FpVersion"] = StaticText(str(getFPVersion()))
        try:
            model = hw.get_device_model()
        except:
            model = hw.get_device_name()
        self["DeviceName"] = StaticText(model)
Ejemplo n.º 32
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("Latest Commits"))
        self.skinName = ["CommitInfo", "About"]
        self["AboutScrollLabel"] = ScrollLabel(_("Please wait"))

        self["actions"] = ActionMap(
            ["SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown,
                "left": self.left,
                "right": self.right
            })

        self["key_red"] = Button(_("Cancel"))

        # get the branch to display from the Enigma version
        try:
            branch = "?sha=" + "-".join(
                about.getEnigmaVersionString().split("-")[3:])
        except:
            branch = ""

        self.project = 0
        self.projects = [
            ("https://api.github.com/repos/Openeight/enigma2/commits",
             "enigma2"),
            ("https://api.github.com/repos/Openeight/SmartLiteFHD/commits",
             "SmartLiteFHD"),
            ("https://api.github.com/repos/Openeight/SmartLiteSD/commits",
             "SmartLiteSD"),
        ]
        self.cachedProjects = {}
        self.Timer = eTimer()
        self.Timer.callback.append(self.readGithubCommitLogs)
        self.Timer.start(50, True)
Ejemplo n.º 33
0
def generateInformation():
	from os import popen
	from Tools.DreamboxHardware import getFPVersion
	from Components.Harddisk import harddiskmanager
	from Components.NimManager import nimmanager
	from Components.About import about
	def command(cmd):
		try:
			result = popen(cmd, "r").read().strip()
			return str(result)
		except:
			pass
	information = [
		 "kernel         : %s\n"%(command("uname -a"))
		,"version        : %s (%s)\n"%(str(about.getImageVersionString()), str(about.getEnigmaVersionString()))
		,"frontprocessor : %s\n"%(str(getFPVersion()))
		,"frontend       : %s\n"%(str(nimmanager.nimList()))
		,"hdd info       : %s\n"%(str(harddiskmanager.HDDList()))
		,"network information : \n%s\n"%(command("ifconfig -a"))
		]
	f = open("/tmp/machine.info", 'w')
	f.writelines(information)
	f.close()
Ejemplo n.º 34
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("About"))
		hddsplit = skin.parameters.get("AboutHddSplit", 0)

		AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
		AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
		AboutText += _("Image: ") + about.getImageTypeString() + "\n"
		AboutText += _("Build date: ") + about.getBuildDateString() + "\n"

		# [WanWizard] Removed until we find a reliable way to determine the installation date
		# AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

		# [WanWizard] No longer that relevant as we now have an accurate build date
		# as I'm not sure this variable isn't used elsewhere, I haven't removed it
		ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
		self["ImageVersion"] = StaticText(ImageVersion)
		# AboutText += ImageVersion + "\n"

		EnigmaVersion = about.getEnigmaVersionString().rsplit("-", 2)
		if len(EnigmaVersion) == 3:
			EnigmaVersion = EnigmaVersion[0] + " " + EnigmaVersion[2] + "-" + EnigmaVersion[1]
		else:
			EnigmaVersion = " ".join(EnigmaVersion)
		EnigmaVersion = _("Enigma version: ") + EnigmaVersion
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += "\n" + EnigmaVersion + "\n"

		AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n"

		AboutText += _("DVB driver version: ") + about.getDriverInstalledDate() + "\n"

		GStreamerVersion = _("GStreamer version: ") + about.getGStreamerVersionString().replace("GStreamer","")
		self["GStreamerVersion"] = StaticText(GStreamerVersion)
		AboutText += GStreamerVersion + "\n"
		
		FFmpegVersion = _("FFmpeg version: ") + about.getFFmpegVersionString()
Ejemplo n.º 35
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self["EnigmaVersion"] = StaticText("Version: " + about.getEnigmaVersionString())
		self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %d") % fp_version

		self["FPVersion"] = StaticText(fp_version)

		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		hddlist = harddiskmanager.HDDList()
		hdd = hddlist and hddlist[0][1] or None
		if hdd is not None and hdd.model() != "":
			self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
		else:
			self["hddA"] = StaticText(_("none"))

		self["actions"] = ActionMap(["SetupActions", "ColorActions"], 
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo
			})
Ejemplo n.º 36
0
def getInfo():
    # TODO: get webif versione somewhere!
    info = {}

    brand = "Dream Multimedia"
    model = "unknown"
    chipset = "unknown"

    if fileExists("/proc/stb/info/boxtype"):
        brand = "Clarke-Xtrend"
        f = open("/proc/stb/info/boxtype", 'r')
        model = f.readline().strip()
        if model == "ini-3000" or model == "ini-5000" or model == "ini-7000":
            brand = "INI-Series"
        f.close()
    elif fileExists("/proc/stb/info/vumodel"):
        brand = "Vuplus"
        f = open("/proc/stb/info/vumodel", 'r')
        model = f.readline().strip()
        f.close()
    elif fileExists("/proc/stb/info/azmodel"):
        brand = "AZBOX"
        f = open("/proc/stb/info/model", 'r')
        model = f.readline().strip()
        f.close()
        if model == "me":
            chipset = "SIGMA 8655"
        elif model == "minime":
            chipset = "SIGMA 8653"
        else:
            chipset = "SIGMA 8634"
    else:
        f = open("/proc/stb/info/model", 'r')
        model = f.readline().strip()
        if model == "spark" or model == "spark7162":
            brand = "AMIKO"
        f.close()

    info['brand'] = brand
    info['model'] = model

    if fileExists("/proc/stb/info/chipset"):
        f = open("/proc/stb/info/chipset", 'r')
        chipset = f.readline().strip()
        f.close()

    info['chipset'] = chipset

    memFree = 0
    for line in open("/proc/meminfo", 'r'):
        parts = line.split(':')
        key = parts[0].strip()
        if key == "MemTotal":
            info['mem1'] = parts[1].strip()
        elif key in ("MemFree", "Buffers", "Cached"):
            memFree += int(parts[1].strip().split(' ', 1)[0])
    info['mem2'] = "%s kB" % memFree

    try:
        f = open("/proc/uptime", "rb")
        uptime = int(float(f.readline().split(' ', 2)[0].strip()))
        f.close()
        uptimetext = ''
        if uptime > 86400:
            d = uptime / 86400
            uptime = uptime % 86400
            uptimetext += '%dd ' % d
        uptimetext += "%d:%.2d" % (uptime / 3600, (uptime % 3600) / 60)
    except:
        uptimetext = "?"
    info['uptime'] = uptimetext

    if fileExists("/etc/bhversion"):
        f = open("/etc/bhversion", 'r')
        imagever = f.readline().strip()
        f.close()
    elif fileExists("/etc/vtiversion.info"):
        f = open("/etc/vtiversion.info", 'r')
        imagever = f.readline().strip()
        f.close()
    else:
        imagever = about.getImageVersionString()

    info["webifver"] = getOpenWebifVer()
    info['imagever'] = imagever
    info['enigmaver'] = about.getEnigmaVersionString()
    info['kernelver'] = about.getKernelVersionString()

    try:
        from Tools.StbHardware import getFPVersion
    except ImportError:
        from Tools.DreamboxHardware import getFPVersion

    info['fp_version'] = getFPVersion()

    info['tuners'] = []
    for i in range(0, nimmanager.getSlotCount()):
        info['tuners'].append({
            "name":
            nimmanager.getNim(i).getSlotName(),
            "type":
            nimmanager.getNimName(i) + " (" +
            nimmanager.getNim(i).getFriendlyType() + ")"
        })

    info['ifaces'] = []
    ifaces = iNetwork.getConfiguredAdapters()
    for iface in ifaces:
        info['ifaces'].append({
            "name":
            iNetwork.getAdapterName(iface),
            "mac":
            iNetwork.getAdapterAttribute(iface, "mac"),
            "dhcp":
            iNetwork.getAdapterAttribute(iface, "dhcp"),
            "ip":
            formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
            "mask":
            formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
            "gw":
            formatIp(iNetwork.getAdapterAttribute(iface, "gateway"))
        })

    info['hdd'] = []
    for hdd in harddiskmanager.hdd:
        if hdd.free() <= 1024:
            free = "%i MB" % (hdd.free())
        else:
            free = float(hdd.free()) / float(1024)
            free = "%.3f GB" % free
        info['hdd'].append({
            "model": hdd.model(),
            "capacity": hdd.capacity(),
            "free": free
        })
    return info
Ejemplo n.º 37
0
	def __init__(self, session):
		Screen.__init__(self, session)
		hddsplit, = skin.parameters.get("AboutHddSplit", (0,))

		AboutText = _("Model: %s %s") % (getMachineBrand(), getMachineName()) + "\n"
		AboutText += _("Image: ") + about.getImageTypeString() + "\n"
		AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n"                             
                if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset: %s") % about.getChipSetString() + "\n"
                AboutText += _("CPU: %s") % about.getCPUString() + "\n"
		AboutText += _("Cores: %s") % about.getCpuCoresString() + "\n"
                AboutText += _("Version: %s") % getImageVersion() + "\n"
		AboutText += _("Build: %s") % getImageBuild() + "\n"
		if path.exists('/proc/stb/info/release') and getBoxType() in ('et7000', 'et7500', 'et8500'):
			realdriverdate = open("/proc/stb/info/release", 'r')
			for line in realdriverdate:
				tmp = line.strip()
				AboutText += _("Drivers: %s") % tmp + "\n"
			realdriverdate.close()
		else:
			string = getDriverDate()
			year = string[0:4]
			month = string[4:6]
			day = string[6:8]
			driversdate = '-'.join((year, month, day))
			AboutText += _("Drivers: %s") % driversdate + "\n"
                EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += EnigmaVersion + "\n"
		AboutText += _("Enigma (re)starts: %d\n") % config.misc.startCounter.value

		GStreamerVersion = "GStreamer: " + about.getGStreamerVersionString().replace("GStreamer","")
		self["GStreamerVersion"] = StaticText(GStreamerVersion)
		AboutText += GStreamerVersion + "\n"

		ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
		self["ImageVersion"] = StaticText(ImageVersion)
		AboutText += ImageVersion + "\n"

		AboutText += _("Python version: ") + about.getPythonVersionString() + "\n" + "\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = "" 
		else:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		self["FPVersion"] = StaticText(fp_version)
		
		skinWidth = getDesktop(0).size().width()
		skinHeight = getDesktop(0).size().height()
		AboutText += _("Skin Name: %s") % config.skin.primary_skin.value[0:-9] + _("  (%s x %s)") % (skinWidth, skinHeight) + "\n"

		if path.exists('/etc/enigma2/EtRcType'):
		        rfp = open('/etc/enigma2/EtRcType', "r")
		        Remote = rfp.read()
			rfp.close
                        AboutText += _("Remote control type") + _(": ") + Remote + "\n"
                else:
                        AboutText += _("Remote control type") + _(": ") + iRcTypeControl.getBoxType() 
                        
                if path.exists('/proc/stb/ir/rc/type'):
		        fp = open('/proc/stb/ir/rc/type', "r")
		        RcID = fp.read()
			fp.close
                        AboutText += _("Remote control ID") + _(": ") + RcID 
		
                self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		AboutText += "\n" + _("Detected NIMs:") + "\n"

		nims = nimmanager.nimList()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		AboutText += "\n" + _("Detected HDD:") + "\n"

		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free()/1024, "G", _("free"))
				else:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free()/1024, "M", _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo
		self["AboutScrollLabel"] = ScrollLabel(AboutText)
		
                self["key_green"] = Button(_("Translations"))
		self["key_red"] = Button(_("Latest Commits"))
		self["key_yellow"] = Button(_("Memory Info"))
		self["key_blue"] = Button(_("%s ") % getMachineName() + _("picture"))
                
                self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"red": self.showCommits,
				"green": self.showTranslationInfo,
				"yellow": self.showMemoryInfo,
				"blue": self.showModelPic,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			}, -2)
Ejemplo n.º 38
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit = skin.parameters.get("AboutHddSplit", 0)

        procmodel = getBoxProc()

        AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        if procmodel != about.getHardwareTypeString():
            AboutText += _("Proc model: ") + procmodel + "\n"
        if fileExists("/proc/stb/info/sn"):
            hwserial = open("/proc/stb/info/sn", "r").read().strip()
            AboutText += _("Hardware serial: ") + hwserial + "\n"

        AboutText += _("Brand: ") + about.getHardwareBrand() + "\n"

        cpu = about.getCPUInfoString()
        AboutText += _("CPU: ") + cpu + "\n"
        AboutText += _("CPU brand: ") + about.getCPUBrand() + "\n"
        AboutText += _("CPU architecture: ") + about.getCPUArch() + "\n"
        if boxbranding.getImageFPU() != "":
            AboutText += _("FPU: ") + boxbranding.getImageFPU() + "\n"
        AboutText += _(
            "Image architecture: ") + boxbranding.getImageArch() + "\n"

        if boxbranding.getImageArch() == "aarch64":
            if boxbranding.getHaveMultiLib() == "True":
                AboutText += _("MultiLib: ") + _("Yes") + "\n"
            else:
                AboutText += _("MultiLib: ") + _("No") + "\n"

        AboutText += _("Flash type: ") + about.getFlashType() + "\n"

        AboutText += "\n" + _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _("Feed URL: ") + boxbranding.getFeedsUrl() + "\n"

        AboutText += _(
            "Open Vision version: ") + about.getVisionVersion() + "\n"
        AboutText += _(
            "Open Vision revision: ") + about.getVisionRevision() + "\n"
        AboutText += _("Open Vision module: ") + about.getVisionModule() + "\n"

        AboutText += _("Build date: ") + about.getBuildDateString() + "\n"
        AboutText += _("Last update: ") + about.getUpdateDateString() + "\n"

        # [WanWizard] Removed until we find a reliable way to determine the installation date
        # AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

        EnigmaVersion = about.getEnigmaVersionString()
        EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2)
        if len(EnigmaVersion) == 3:
            EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[
                2] + "-" + EnigmaVersion[1] + ")"
        else:
            EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")"
        EnigmaVersion = _("Enigma version: ") + EnigmaVersion
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += "\n" + EnigmaVersion + "\n"
        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value
        AboutText += _("Enigma debug level: %d\n") % eGetEnigmaDebugLvl()

        AboutText += "\n" + _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"

        AboutText += _(
            "DVB driver version: ") + about.getDriverInstalledDate() + "\n"
        AboutText += _("DVB API: ") + about.getDVBAPI() + "\n"
        if fileExists("/usr/bin/dvb-fe-tool"):
            import time
            try:
                cmd = 'dvb-fe-tool > /tmp/dvbfetool.txt'
                res = Console().ePopen(cmd)
                time.sleep(0.1)
            except:
                pass
        if fileExists("/tmp/dvbfetool.txt"):
            if fileHas("/tmp/dvbfetool.txt", "DVBC") or fileHas(
                    "/tmp/dvbfetool.txt", "DVB-C"):
                AboutText += _("DVB-C: ") + _("Yes") + "\n"
            else:
                AboutText += _("DVB-C: ") + _("No") + "\n"
            if fileHas("/tmp/dvbfetool.txt", "DVBS") or fileHas(
                    "/tmp/dvbfetool.txt", "DVB-S"):
                AboutText += _("DVB-S: ") + _("Yes") + "\n"
            else:
                AboutText += _("DVB-S: ") + _("No") + "\n"
            if fileHas("/tmp/dvbfetool.txt", "DVBT") or fileHas(
                    "/tmp/dvbfetool.txt", "DVB-T"):
                AboutText += _("DVB-T: ") + _("Yes") + "\n"
            else:
                AboutText += _("DVB-T: ") + _("No") + "\n"
            if fileHas("/tmp/dvbfetool.txt", "MULTISTREAM"):
                AboutText += _("Multistream: ") + _("Yes") + "\n"
            else:
                AboutText += _("Multistream: ") + _("No") + "\n"
            if fileHas("/tmp/dvbfetool.txt", "ANNEX_A") or fileHas(
                    "/tmp/dvbfetool.txt", "ANNEX-A"):
                AboutText += _("ANNEX-A: ") + _("Yes") + "\n"
            else:
                AboutText += _("ANNEX-A: ") + _("No") + "\n"
            if fileHas("/tmp/dvbfetool.txt", "ANNEX_B") or fileHas(
                    "/tmp/dvbfetool.txt", "ANNEX-B"):
                AboutText += _("ANNEX-B: ") + _("Yes") + "\n"
            else:
                AboutText += _("ANNEX-B: ") + _("No") + "\n"
            if fileHas("/tmp/dvbfetool.txt", "ANNEX_C") or fileHas(
                    "/tmp/dvbfetool.txt", "ANNEX-C"):
                AboutText += _("ANNEX-C: ") + _("Yes") + "\n"
            else:
                AboutText += _("ANNEX-C: ") + _("No") + "\n"

        GStreamerVersion = _("GStreamer version: "
                             ) + about.getGStreamerVersionString(cpu).replace(
                                 "GStreamer", "")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)
        AboutText += "\n" + GStreamerVersion + "\n"

        FFmpegVersion = _("FFmpeg version: ") + about.getFFmpegVersionString()
        self["FFmpegVersion"] = StaticText(FFmpegVersion)
        AboutText += FFmpegVersion + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %s") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        if boxbranding.getHaveTranscoding() != "":
            AboutText += _("Transcoding: ") + _("Yes") + "\n"
        else:
            AboutText += _("Transcoding: ") + _("No") + "\n"

        if boxbranding.getHaveMultiTranscoding() != "":
            AboutText += _("MultiTranscoding: ") + _("Yes") + "\n"
        else:
            AboutText += _("MultiTranscoding: ") + _("No") + "\n"

        AboutText += _('Skin & Resolution: %s (%sx%s)\n') % (
            config.skin.primary_skin.value.split('/')[0],
            getDesktop(0).size().width(), getDesktop(0).size().height())

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimListCompressed()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, "G",
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), "M", _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo + "\n\n" + _("Network Info:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\n" + x[0] + ": " + x[1]

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Translations"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_yellow"] = Button(_("Troubleshoot"))
        self["key_blue"] = Button(_("Memory Info"))

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "red": self.showCommits,
                "green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "yellow": self.showTroubleshoot,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Ejemplo n.º 39
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit = parameters.get("AboutHddSplit", 1)

        AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        cpu = about.getCPUInfoString()
        AboutText += _("CPU: ") + cpu + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _("Build date: ") + about.getBuildDateString() + "\n"
        AboutText += _("Last update: ") + about.getUpdateDateString() + "\n"

        # [WanWizard] Removed until we find a reliable way to determine the installation date
        # AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

        EnigmaVersion = about.getEnigmaVersionString()
        EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2)
        if len(EnigmaVersion) == 3:
            EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[
                2] + "-" + EnigmaVersion[1] + ")"
        else:
            EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")"
        EnigmaVersion = _("Enigma version: ") + EnigmaVersion
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += "\n" + EnigmaVersion + "\n"

        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"

        AboutText += _(
            "DVB driver version: ") + about.getDriverInstalledDate() + "\n"

        GStreamerVersion = _("Media player: GStreamer, version "
                             ) + about.getGStreamerVersionString().replace(
                                 "GStreamer", "")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)

        ffmpegVersion = _(
            "Media player: ffmpeg, version ") + about.getffmpegVersionString()
        self["ffmpegVersion"] = StaticText(ffmpegVersion)

        if cpu.upper().startswith('HI') or os.path.isdir('/proc/hisi'):
            AboutText += ffmpegVersion + "\n"
        else:
            AboutText += GStreamerVersion + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n"

        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value
        AboutText += _("Uptime: %s\n") % about.getBoxUptime()
        AboutText += _("Enigma debug level: %d\n") % eGetEnigmaDebugLvl()

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %s") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        AboutText += _('Skin & Resolution: %s (%sx%s)\n') % (
            config.skin.primary_skin.value.split('/')[0],
            getDesktop(0).size().width(), getDesktop(0).size().height())

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimListCompressed()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected storage devices:"))
        AboutText += "\n" + _("Detected storage devices:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %s %s" or "%s\n(%s, %.1f %s %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, _("GB"),
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), _("MB"), _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo + "\n\n" + _("Network Info:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\n" + x[0] + ": " + x[1]
        if SystemInfo["HasHDMI-CEC"] and config.hdmicec.enabled.value:
            AboutText += "\n\n" + _(
                "HDMI-CEC address"
            ) + ": " + config.hdmicec.fixed_physical_address.value

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Translations"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_yellow"] = Button(_("Troubleshoot"))
        self["key_blue"] = Button(_("Memory Info"))

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "red": self.showCommits,
                "green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "yellow": self.showTroubleshoot,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Ejemplo n.º 40
0
	def __init__(self, session):
		Screen.__init__(self, session)
		
		if config.misc.boxtype.value == 'gb800solo':
			AboutText = _("Hardware: ") + " GigaBlue HD 800solo\n"
		elif config.misc.boxtype.value == 'gb800se':
			AboutText = _("Hardware: ") + " GigaBlue HD 800se\n"
		elif config.misc.boxtype.value == 'gb800ue':
			AboutText = _("Hardware: ") + " GigaBlue HD 800ue\n"
		elif config.misc.boxtype.value == 'gbquad':
			AboutText = _("Hardware: ") + " GigaBlue HD Quad\n"
		elif config.misc.boxtype.value == 'gbquadplus':
			AboutText = _("Hardware: ") + " GigaBlue HD Quad Plus\n"			
		elif config.misc.boxtype.value == 'gb800seplus':
			AboutText = _("Hardware: ") + " GigaBlue HD 800se Plus\n"
		elif config.misc.boxtype.value == 'gb800ueplus':
			AboutText = _("Hardware: ") + " GigaBlue HD 800ue Plus\n"			
		else:
			AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"

		AboutText += _("Image: ") + about.getImageTypeString() + "\n"
		AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n"

		EnigmaVersion = "GUI Build: " + about.getEnigmaVersionString()
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += EnigmaVersion + "\n"

		ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
		self["ImageVersion"] = StaticText(ImageVersion)
		AboutText += ImageVersion + "\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		self["FPVersion"] = StaticText(fp_version)

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		AboutText += "\n" + _("Detected NIMs:") + "\n"

		nims = nimmanager.nimList()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		AboutText += "\n" + _("Detected HDD:") + "\n"

		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024, _("free"))
				else:
					hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo
		self["AboutScrollLabel"] = ScrollLabel(AboutText)

		self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			})
Ejemplo n.º 41
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('About'))
        hddsplit = skin.parameters.get('AboutHddSplit', 0)
        
        TSVer = 'OpenTSimage'
        f = open('/etc/imageversion', 'r')
        TSVer = f.readline().strip()
        f.close()

        TSRev = ''
        f = open('/etc/TSRev', 'r')
        TSRev = f.readline().strip()
        f.close()
        
        AboutText = _('OpenTSimage ') + TSVer + '\n'
        AboutText += _('Support: RAED [email protected]') + '\n\n'

        AboutText += _('Hardware: ') + about.getHardwareTypeString() + '\n'
        AboutText += _('CPU: ') + about.getCPUInfoString() + '\n'
        # AboutText += _("Build date: ") + about.getBuildDateString() + "\n"

        # [WanWizard] Removed until we find a reliable way to determine the installation date
        # AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

        # [WanWizard] No longer that relevant as we now have an accurate build date
        # as I'm not sure this variable isn't used elsewhere, I haven't removed it

        #ImageVersion = _('Last upgrade: ') + about.getImageVersionString()
        #self['ImageVersion'] = StaticText(ImageVersion)
        #AboutText += ImageVersion + '\n'
        self["ImageVersion"] = StaticText('Firmware: ' + TSVer + ' ' + TSRev)

        EnigmaVersion = about.getEnigmaVersionString().rsplit("-", 2)
        if len(EnigmaVersion) == 3:
            EnigmaVersion = EnigmaVersion[0] + " " + EnigmaVersion[2] + "-" + EnigmaVersion[1]
        else:
            EnigmaVersion = " ".join(EnigmaVersion)
        EnigmaVersion = _("Enigma version: ") + EnigmaVersion
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += "\n" + EnigmaVersion + "\n"

        AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n"

        AboutText += _("DVB driver version: ") + about.getDriverInstalledDate() + "\n"

        GStreamerVersion = _("GStreamer version: ") + about.getGStreamerVersionString().replace("GStreamer","")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + "\n"

        AboutText += _('Python version: ') + about.getPythonVersionString() + '\n'

        AboutText += _("Enigma (re)starts: %d\n") % config.misc.startCounter.value

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ''
        else:
            fp_version = _('Frontprocessor version: %s') % fp_version
            AboutText += fp_version + '\n'
        self['FPVersion'] = StaticText(fp_version)

        self['TunerHeader'] = StaticText(_('Detected NIMs:'))
        AboutText += '\n' + _('Detected NIMs:') + '\n'

        nims = nimmanager.nimListCompressed()
        for count in range(len(nims)):
            if count < 4:
                self['Tuner' + str(count)] = StaticText(nims[count])
            else:
                self['Tuner' + str(count)] = StaticText('')
            AboutText += nims[count] + '\n'

        self['HDDHeader'] = StaticText(_('Detected HDD:'))
        AboutText += '\n' + _('Detected HDD:') + '\n'
        hddlist = harddiskmanager.HDDList()
        hddinfo = ''
        if hddlist:
            formatstring = hddsplit and '%s:%s, %.1f %sB %s' or '%s\n(%s, %.1f %sB %s)'
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += '\n'
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(),
                     hdd.capacity(),
                     hdd.free() / 1024.0,
                     'G',
                     _('free'))
                else:
                    hddinfo += formatstring % (hdd.model(),
                     hdd.capacity(),
                     hdd.free(),
                     'M',
                     _('free'))

        else:
            hddinfo = _('none')
        self['hddA'] = StaticText(hddinfo)
        AboutText += hddinfo + '\n\n' + _('Network Info:')
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += '\n' + x[0] + ': ' + x[1]

        self['AboutScrollLabel'] = ScrollLabel(AboutText)
        self['key_green'] = Button(_('Translations'))
        self['key_red'] = Button(_('Latest Commits'))
        self['key_yellow'] = Button(_('Troubleshoot'))
        self['key_blue'] = Button(_('Memory Info'))
        self['actions'] = ActionMap(['ColorActions', 'SetupActions', 'DirectionActions'], {'cancel': self.close,
         'ok': self.close,
         'red': self.showCommits,
         'green': self.showTranslationInfo,
         'blue': self.showMemoryInfo,
         'yellow': self.showTroubleshoot,
         'up': self['AboutScrollLabel'].pageUp,
         'down': self['AboutScrollLabel'].pageDown})
Ejemplo n.º 42
0
	def __init__(self, session):
		Screen.__init__(self, session)


		AboutText = _("Model: %s %s") % (getMachineBrand(), getMachineName()) + "\n"
		AboutText += _("Image: ") + about.getImageTypeString() + "\n"
		AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n"                             
                if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset: %s") % about.getChipSetString() + "\n"
                AboutText += _("CPU: %s") % about.getCPUString() + "\n"
		AboutText += _("Cores: %s") % about.getCpuCoresString() + "\n"
                AboutText += _("Version: %s") % getImageVersion() + "\n"
		AboutText += _("Build: %s") % getImageBuild() + "\n"
                string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers: %s") % driversdate + "\n"
                EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += EnigmaVersion + "\n"

		GStreamerVersion = "GStreamer: " + about.getGStreamerVersionString()
		self["GStreamerVersion"] = StaticText(GStreamerVersion)
		AboutText += GStreamerVersion + "\n"

		ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
		self["ImageVersion"] = StaticText(ImageVersion)
		AboutText += ImageVersion + "\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		self["FPVersion"] = StaticText(fp_version)

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		AboutText += "\n" + _("Detected NIMs:") + "\n"

		nims = nimmanager.nimList()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		AboutText += "\n" + _("Detected HDD:") + "\n"

		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += "%s\n(%s, %.1f GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024., _("free"))
				else:
					hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo
		self["AboutScrollLabel"] = ScrollLabel(AboutText)
		self["key_green"] = Button(_("Translations"))
		self["key_red"] = Button(_("Latest Commits"))
		self["key_yellow"] = Button(_("Memory Info"))

		self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"red": self.showCommits,
				"green": self.showTranslationInfo,
				"yellow": self.showMemoryInfo,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			}, -2)
Ejemplo n.º 43
0
 def getEnigmaVersionString():
     return about.getEnigmaVersionString()
Ejemplo n.º 44
0
Archivo: About.py Proyecto: ssh1/stbgui
	def __init__(self, session):
		Screen.__init__(self, session)

		hddsplit, = skin.parameters.get("AboutHddSplit", (0,))

		#AboutHddSplit = 0
		#try:
		#	hddsplit = skin.parameters.get("AboutHddSplit",(0))[0]
		#except:
		#	hddsplit = AboutHddSplit

		if boxtype == 'gb800solo':
			BoxName = "GigaBlue HD 800SOLO"
		elif boxtype == 'gb800se':
			BoxName = "GigaBlue HD 800SE"
		elif boxtype == 'gb800ue':
			BoxName = "GigaBlue HD 800UE"
		elif boxtype == 'gbquad':
			BoxName = "GigaBlue HD Quad"
		elif boxtype == 'gbquadplus':
			BoxName = "GigaBlue HD Quadplus"
		elif boxtype == 'gb800seplus':
			BoxName = "GigaBlue HD 800SEplus"
		elif boxtype == 'gb800ueplus':
			BoxName = "GigaBlue HD 800UEplus"
		elif boxtype == 'gbipbox':
			BoxName = "GigaBlue IP Box"
		elif boxtype == 'gbultra':
			BoxName = "GigaBlue HD Ultra"
		elif boxtype == 'gbultraue':
			BoxName = "GigaBlue HD Ultra UE"
		elif boxtype == 'gbultrase':
			BoxName = "GigaBlue HD Ultra SE"
		elif boxtype == 'gbx1':
			BoxName = "GigaBlue X1"
		elif boxtype == 'gbx3':
			BoxName = "GigaBlue X3"
		elif boxtype == 'spycat':
			BoxName = "XCORE Spycat"
		elif boxtype == 'quadbox2400':
			BoxName = "AX Quadbox HD2400"
		else:
			BoxName = about.getHardwareTypeString()

		ImageType = about.getImageTypeString()
		self["ImageType"] = StaticText(ImageType)

		AboutHeader = ImageType + " - " + BoxName
		self["AboutHeader"] = StaticText(AboutHeader)

		AboutText = AboutHeader + "\n"

		#AboutText += _("Hardware: ") + about.getHardwareTypeString() + "\n"
		#AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
		#AboutText += _("Installed: ") + about.getFlashDateString() + "\n"
		#AboutText += _("Image: ") + about.getImageTypeString() + "\n"

		CPUinfo = _("CPU: ") + about.getCPUInfoString() + "\n"
		self["CPUinfo"] = StaticText(CPUinfo)
		AboutText += CPUinfo + "\n"

		CPUspeed = _("Speed: ") + about.getCPUSpeedString() + "\n"
		self["CPUspeed"] = StaticText(CPUspeed)
		AboutText += CPUspeed + "\n"

		ChipsetInfo = _("Chipset: ") + about.getChipSetString() + "\n"
		self["ChipsetInfo"] = StaticText(ChipsetInfo)
		AboutText += ChipsetInfo + "\n"

		KernelVersion = _("Kernel version: ") + about.getKernelVersionString() + "\n"
		self["KernelVersion"] = StaticText(KernelVersion)
		AboutText += KernelVersion + "\n"

		EnigmaVersion = _("GUI Build: ") + about.getEnigmaVersionString()
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += EnigmaVersion + "\n"
		AboutText += _("Enigma (re)starts: %d\n") % config.misc.startCounter.value

		GStreamerVersion = _("GStreamer: ") + about.getGStreamerVersionString().replace("GStreamer","")
		self["GStreamerVersion"] = StaticText(GStreamerVersion)
		AboutText += GStreamerVersion + "\n"

		FlashDate = _("Flashed: ") + about.getFlashDateString()
		self["FlashDate"] = StaticText(FlashDate)
		AboutText += FlashDate + "\n"

		ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
		self["ImageVersion"] = StaticText(ImageVersion)
		AboutText += ImageVersion + "\n"

		AboutText += _("DVB drivers: ") + about.getDriverInstalledDate() + "\n"

		AboutText += _("Python version: ") + about.getPythonVersionString() + "\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		self["FPVersion"] = StaticText(fp_version)

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		AboutText += "\n" + _("Detected NIMs:") + "\n"

		nims = nimmanager.nimList()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		AboutText += "\n" + _("Detected HDD:") + "\n"

		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free()/1024, "G", _("free"))
				else:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free()/1024, "M", _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo
		self["AboutScrollLabel"] = ScrollLabel(AboutText)
		self["key_green"] = Button(_("Translations"))
		self["key_red"] = Button(_("Latest Commits"))
		self["key_blue"] = Button(_("Memory Info"))

		self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"red": self.showCommits,
				"green": self.showTranslationInfo,
				"blue": self.showMemoryInfo,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			})
Ejemplo n.º 45
0
	def populate(self):
		if isVTISkin:
			self["EnigmaVersion"] = StaticText(_("Version") + ": " + about.getEnigmaVersionString())
			self["ImageVersion"] = StaticText(_("Image") + ": " + about.getImageVersionString())

			self["TunerHeader"] = StaticText(_("Detected NIMs:"))

			fp_version = getFPVersion()
			if fp_version is None:
				fp_version = ""
			else:
				fp_version = _("Frontprocessor version: %s") % str(fp_version)

			self["FPVersion"] = StaticText(fp_version)

			nims = nimmanager.nimList()
			self.tuner_list = []
			if len(nims) <= 4 :
				for count in (0, 1, 2, 3, 4, 5, 6, 7):
					if count < len(nims):
						self["Tuner" + str(count)] = StaticText(nims[count])
						self.tuner_list.append((nims[count] + "\n"))
					else:
						self["Tuner" + str(count)] = StaticText("")
			else:
				desc_list = []
				count = 0
				cur_idx = -1
				while count < len(nims):
					data = nims[count].split(":")
					idx = data[0].strip('Tuner').strip()
					desc = data[1].strip()
					if desc_list and desc_list[cur_idx]['desc'] == desc:
						desc_list[cur_idx]['end'] = idx
					else:
						desc_list.append({'desc' : desc, 'start' : idx, 'end' : idx})
						cur_idx += 1
					count += 1

				for count in (0, 1, 2, 3, 4, 5, 6, 7):
					if count < len(desc_list):
						if desc_list[count]['start'] == desc_list[count]['end']:
							text = "Tuner %s: %s" % (desc_list[count]['start'], desc_list[count]['desc'])
						else:
							text = "Tuner %s-%s: %s" % (desc_list[count]['start'], desc_list[count]['end'], desc_list[count]['desc'])
					else:
						text = ""

					self["Tuner" + str(count)] = StaticText(text)
					if text != "":
						self.tuner_list.append(text + "\n")

			self["HDDHeader"] = StaticText(_("Detected HDD:"))
			hddlist = harddiskmanager.HDDList()
			hdd = hddlist and hddlist[0][1] or None
			if hdd is not None and hdd.model() != "":
				self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
			else:
				self["hddA"] = StaticText(_("none"))


			self.enigma2_version = _("Version") + ": " + about.getEnigmaVersionString()
			self.image_version = _("Image") + ": " + about.getImageVersionString()
			cpu_info = parseLines("/proc/cpuinfo")
			cpu_name = "N/A"
			for line in cpu_info:
				if line.find('model') != -1:
					cpu_name = line.split(':')
					if len(cpu_name) >= 2:
						cpu_name = cpu_name[1].strip()
					break

			self.cpu = _("CPU") + ": " + cpu_name
			self.chipset = _("Chipset") + ": " + parseFile("/proc/stb/info/chipset")
			self.tuner_header = _("Detected NIMs:")
			self.hdd_header = _("Detected HDD:")
			self.hdd_list = []
			if len(hddlist):
				for hddX in hddlist:
					hdd = hddX[1]
					if hdd.model() != "":
						self.hdd_list.append((hdd.model() + "\n   %.2f GB - %.2f GB" % (hdd.diskSize()/1000.0, hdd.free()/1000.0) + " " + _("free") + "\n\n"))

			ifaces = iNetwork.getConfiguredAdapters()
			iface_list = []
			for iface in ifaces:
				iface_list.append((_("Interface") + " : " + iNetwork.getAdapterName(iface) + " ("+ iNetwork.getFriendlyAdapterName(iface) + ")\n"))
				iface_list.append((_("IP") + " : " + parse_ipv4(iNetwork.getAdapterAttribute(iface, "ip")) + "\n"))
				iface_list.append((_("Netmask") + " : " + parse_ipv4(iNetwork.getAdapterAttribute(iface, "netmask")) + "\n"))
				iface_list.append((_("Gateway") + " : " + parse_ipv4(iNetwork.getAdapterAttribute(iface, "gateway")) + "\n"))
				if iNetwork.getAdapterAttribute(iface, "dhcp"):
					iface_list.append((_("DHCP") + " : " + _("Yes") + "\n"))
				else:
					iface_list.append((_("DHCP") + " : " + _("No") + "\n"))
				iface_list.append((_("MAC") + " : " + iNetwork.getAdapterAttribute(iface, "mac") + "\n"))
				iface_list.append(("\n"))

			my_txt = self.enigma2_version + "\n"
			my_txt += self.image_version + "\n"
			my_txt += "\n"
			my_txt += self.cpu + "\n"
			my_txt += self.chipset + "\n"
			my_txt += "\n"
			my_txt += self.tuner_header + "\n"
			for x in self.tuner_list:
				my_txt += "   " + x
			my_txt += "\n"
			my_txt += _("Network") + ":\n"
			for x in iface_list:
				my_txt += "   " + x
			my_txt += self.hdd_header + "\n"
			for x in self.hdd_list:
				my_txt += "   " + x
			my_txt += "\n"

			self["FullAbout"] = ScrollLabel(my_txt)
		else:
			self["lab1"] = StaticText(_("openESI"))
			self["lab2"] = StaticText(_("By openESI Image Team"))
			self["lab3"] = StaticText(_("Support at") + " www.openesi.eu")
			model = None
			AboutText = getAboutText()[0]
			self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 46
0
	def __init__(self, session):
		Screen.__init__(self, session)

		# [ IQON : by knuth
		model = HardwareInfo().get_device_name() 
		macaddress = about.getMacAddressString("eth0")

		if model in ("force2solid"):
			AboutText = _("BRAND: ") + "IQON" + "\n"
			AboutText += _("Hardware: ") + "FORCE2" + "\n"
		elif model in ("tmnanose"):
			AboutText = _("Hardware: ") + "TM-NANO-SE" + "\n"
		elif model in ("optimussosplus"):
			AboutText = _("Hardware: ") + "OPTIMUSS OS+" + "\n"
		elif model in ("force2plus"):
			AboutText = _("Hardware: ") + "FORCE2+" + "\n"
		elif model in ("tmnanosecombo"):
			AboutText = _("Hardware: ") + "TM-NANO-SE Combo" + "\n"
		elif model in ("tmnanosem2"):
			AboutText = _("Hardware: ") + "TM-NANO-SE M2" + "\n"
		elif model in ("optimussos2"):
			AboutText = _("Hardware: ") + "OPTIMUSS OS2" + "\n"
		elif model in ("optimussos1"):
			AboutText = _("Hardware: ") + "OPTIMUSS OS1" + "\n"
		elif model in ("optimussos2plus"):
			AboutText = _("Hardware: ") + "OPTIMUSS OS2+" + "\n"
		elif model in ("optimussos1plus"):
			AboutText = _("Hardware: ") + "OPTIMUSS OS1+" + "\n"
		elif model in ("force2eco"):
			AboutText = _("Hardware: ") + "FORCE2 Eco" + "\n"
		elif model in ("fusionhd"):
			AboutText = _("Hardware: ") + "FUSION HD" + "\n"
		elif model in ("force1plus"):
			f = open("/etc/.brandtype", 'r')
			line = f.readline()
			if "technomate" in line:
				AboutText = _("Hardware: ") + "TM-NANO-3T COMBO" + "\n"
			elif "edision" in line:
				AboutText = _("Hardware: ") + "OPTIMUSS OS3+" + "\n"
			elif "iqon" in line:
				AboutText = _("BRAND: ") + "IQON" + "\n"
				AboutText += _("Hardware: ") + about.getHardwareTypeString() + "\n"
			else:
				AboutText = _("Hardware: ") + about.getHardwareModelString() + "\n"
			f.close()
		else:
			AboutText = _("Hardware: ") + about.getHardwareModelString() + "\n"

		AboutText += _("Mac Address: ") + macaddress + "\n"
		if HardwareInfo().has_micom():
			AboutText += _("Micom Version: ") + about.getMicomVersionString() + "\n"
#		AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
		AboutText += _("Image: ") + about.getImageTypeString() + "\n"
		AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n"

		EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += EnigmaVersion + "\n"

		ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
		self["ImageVersion"] = StaticText(ImageVersion)
		AboutText += ImageVersion + "\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

#        if path.exists('/proc/stb/info/chipset'):
		AboutText += _("Chipset: BCM%s\n") % about.getChipSetString()
		AboutText += _("CPU: %s\n") % about.getCPUString()
		AboutText += _("CPU Speed: %s\n") % about.getCPUSpeedString()
		AboutText += _("Cores: %s\n") % about.getCpuCoresString()

		self["FPVersion"] = StaticText(fp_version)

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		AboutText += "\n" + _("Detected NIMs:") + "\n"

		nims = nimmanager.nimList()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		AboutText += "\n" + _("Detected HDD:") + "\n"

		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024, _("free"))
				else:
					hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo
		self["AboutScrollLabel"] = ScrollLabel(AboutText)
		self["key_green"] = Button(_("Translations"))
		self["key_red"] = Button(_("Latest Commits"))

		self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"red": self.showCommits,
				"green": self.showTranslationInfo,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			})

		self["hidden_action"] = ActionMap(["ColorActions"],
		{
			"red": self.red_action,
			"blue": self.blue_action,
			"info": self.info_action,
			"1": self.first_action,
			"2": self.second_action,
			"3": self.third_action,
		},-1)

		self.key_status = -1
Ejemplo n.º 47
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit = skin.parameters.get("AboutHddSplit", 0)

        AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _("Build date: ") + about.getBuildDateString() + "\n"

        # [WanWizard] Removed until we find a reliable way to determine the installation date
        # AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

        # [WanWizard] No longer that relevant as we now have an accurate build date
        # as I'm not sure this variable isn't used elsewhere, I haven't removed it
        ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
        self["ImageVersion"] = StaticText(ImageVersion)
        # AboutText += ImageVersion + "\n"

        EnigmaVersion = about.getEnigmaVersionString()
        EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2)
        if len(EnigmaVersion) == 3:
            EnigmaVersion = EnigmaVersion[0] + " " + EnigmaVersion[
                2] + "-" + EnigmaVersion[1]
        else:
            EnigmaVersion = " ".join(EnigmaVersion)
        EnigmaVersion = _("Enigma version: ") + EnigmaVersion
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += "\n" + EnigmaVersion + "\n"

        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"

        AboutText += _(
            "DVB driver version: ") + about.getDriverInstalledDate() + "\n"

        GStreamerVersion = _(
            "GStreamer version: ") + about.getGStreamerVersionString().replace(
                "GStreamer", "")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n"

        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %s") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimListCompressed()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, "G",
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), "M", _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo + "\n\n" + _("Network Info:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\n" + x[0] + ": " + x[1]

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Translations"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_yellow"] = Button(_("Troubleshoot"))
        self["key_blue"] = Button(_("Memory Info"))

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "red": self.showCommits,
                "green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "yellow": self.showTroubleshoot,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Ejemplo n.º 48
0
def getInstance():
	global instance
	
	if instance is None:
		
		log.reinit()
		
		from plugin import VERSION
		
		log.debug(" SERIESPLUGIN NEW INSTANCE " + VERSION)
		log.debug( " ", strftime("%a, %d %b %Y %H:%M:%S", localtime()) )
		
		try:
			from Tools.HardwareInfo import HardwareInfo
			log.debug( " DeviceName " + HardwareInfo().get_device_name().strip() )
		except:
			sys.exc_clear()
		
		try:
			from Components.About import about
			log.debug( " EnigmaVersion " + about.getEnigmaVersionString().strip() )
			log.debug( " ImageVersion " + about.getVersionString().strip() )
		except:
			sys.exc_clear()
		
		try:
			#http://stackoverflow.com/questions/1904394/python-selecting-to-read-the-first-line-only
			log.debug( " dreamboxmodel " + open("/proc/stb/info/model").readline().strip() )
			log.debug( " imageversion " + open("/etc/image-version").readline().strip() )
			log.debug( " imageissue " + open("/etc/issue.net").readline().strip() )
		except:
			sys.exc_clear()
		
		try:
			for key, value in config.plugins.seriesplugin.dict().iteritems():
				log.debug( " config..%s = %s" % (key, str(value.value)) )
		except Exception as e:
			sys.exc_clear()
		
		global CompiledRegexpReplaceChars
		try:
			if config.plugins.seriesplugin.replace_chars.value:
				CompiledRegexpReplaceChars = re.compile('['+config.plugins.seriesplugin.replace_chars.value.replace("\\", "\\\\\\\\")+']')
		except:
			log.exception( " Config option 'Replace Chars' is no valid regular expression" )
			CompiledRegexpReplaceChars = re.compile("[:\!/\\,\(\)'\?]")
		
		# Check autotimer
		try:
			from Plugins.Extensions.AutoTimer.plugin import autotimer
			deprecated = False
			try:
				from Plugins.Extensions.AutoTimer.plugin import AUTOTIMER_VERSION
				if int(AUTOTIMER_VERSION[0]) < 4:
					deprecated = True
			except ImportError:
				AUTOTIMER_VERSION = "deprecated"
				deprecated = True
			log.debug( " AutoTimer: " + AUTOTIMER_VERSION )
			if deprecated:
				log.warning( _("Your autotimer is deprecated")  + "\n" +_("Please update it") )
		except ImportError:
			log.debug( " AutoTimer: Not found" )
		
		# Check dependencies
		start = True
		from imp import find_module
		dependencies = ["difflib", "json", "re", "xml", "xmlrpclib"]
		for dependency in dependencies:
			try:
				find_module(dependency)
			except ImportError:
				start = False
				log.error( _("Error missing dependency")  + "\n" + "python-"+dependency + "\n\n" +_("Please install missing python paket manually") )
		if start:
			instance = SeriesPlugin()
		
	return instance
Ejemplo n.º 49
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit, = skin.parameters.get("AboutHddSplit", (0, ))

        AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        #AboutText += _("Installed: ") + about.getFlashDateString() + "\n"
        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"

        EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += EnigmaVersion + "\n"
        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value

        #GStreamerVersion = "GStreamer: " + about.getGStreamerVersionString().replace("GStreamer","")
        #self["GStreamerVersion"] = StaticText(GStreamerVersion)
        #AboutText += GStreamerVersion + "\n"
        self["GStreamerVersion"] = StaticText("")

        ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
        self["ImageVersion"] = StaticText(ImageVersion)
        AboutText += ImageVersion + "\n"

        AboutText += _("DVB drivers: ") + about.getDriverInstalledDate() + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n"

        fp_version = getFPVersion()
        if fp_version is None or fp_version == 0:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimList()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, "G",
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), "M", _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo
        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Translations"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_blue"] = Button(_("Memory Info"))

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "red": self.showCommits,
                "green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Ejemplo n.º 50
0
def getInfo():
	# TODO: get webif versione somewhere!
	info = {}

	brand = "Dream Multimedia"
	model = "unknown"
	chipset = "unknown"
	
	if fileExists("/proc/stb/info/boxtype"):
		brand = "Clarke-Xtrend"
		f = open("/proc/stb/info/boxtype",'r')
 		model = f.readline().strip()
 		if model == "ini-3000" or model == "ini-5000" or model == "ini-7000":
		    brand = "INI-Series"
 		f.close()
	elif fileExists("/proc/stb/info/vumodel"):
		brand = "Vuplus"
		f = open("/proc/stb/info/vumodel",'r')
 		model = f.readline().strip()
 		f.close()
	elif fileExists("/proc/stb/info/azmodel"):
		brand = "AZBOX"
		f = open("/proc/stb/info/model",'r')
 		model = f.readline().strip()
 		f.close()
 		if model == "me":
			chipset = "SIGMA 8655"
 		elif model == "minime":
			chipset = "SIGMA 8653"
 		else:
			chipset = "SIGMA 8634"
	else:
		f = open("/proc/stb/info/model",'r')
 		model = f.readline().strip()
 		f.close()

	info['brand'] = brand
	info['model'] = model

	if fileExists("/proc/stb/info/chipset"):
		f = open("/proc/stb/info/chipset",'r')
 		chipset = f.readline().strip()
 		f.close()
		
	info['chipset'] = chipset
	
	memFree = 0
	for line in open("/proc/meminfo",'r'):
	 	parts = line.split(':')
		key = parts[0].strip()
		if key == "MemTotal":
			info['mem1'] = parts[1].strip()
		elif key in ("MemFree", "Buffers", "Cached"):
			memFree += int(parts[1].strip().split(' ',1)[0])
	info['mem2'] = "%s kB" % memFree
		
	try:
		f = open("/proc/uptime", "rb")
		uptime = int(float(f.readline().split(' ', 2)[0].strip()))
		f.close()
		uptimetext = ''
		if uptime > 86400:
			d = uptime/86400
			uptime = uptime % 86400
			uptimetext += '%dd ' % d
		uptimetext += "%d:%.2d" % (uptime/3600, (uptime%3600)/60)
	except:
		uptimetext = "?"
	info['uptime'] = uptimetext
		
	if fileExists("/etc/bhversion"):
		f = open("/etc/bhversion",'r')
		imagever = f.readline().strip()
		f.close()
	elif fileExists("/etc/vtiversion.info"):
		f = open("/etc/vtiversion.info",'r')
		imagever = f.readline().strip()
		f.close()
	else:
		imagever = about.getImageVersionString()
		
	info["webifver"] = getOpenWebifVer()
	info['imagever'] = imagever
	info['enigmaver'] = about.getEnigmaVersionString()
	info['kernelver'] = about.getKernelVersionString()
	
	info['fp_version'] = getFPVersion()
	
	info['tuners'] = []
	for i in range(0, nimmanager.getSlotCount()):
		info['tuners'].append({
			"name": nimmanager.getNim(i).getSlotName(),
			"type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")"
		})

	info['ifaces'] = []
	ifaces = iNetwork.getConfiguredAdapters()
	for iface in ifaces:
		info['ifaces'].append({
			"name": iNetwork.getAdapterName(iface),
			"mac": iNetwork.getAdapterAttribute(iface, "mac"),
			"dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"),
			"ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
			"mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
			"gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway"))
		})
			
	info['hdd'] = []
	for hdd in harddiskmanager.hdd:
		if hdd.free() <= 1024:
			free = "%i MB" % (hdd.free())
		else:
			free = float(hdd.free()) / float(1024)
			free = "%.3f GB" % free
		info['hdd'].append({
			"model": hdd.model(),
			"capacity": hdd.capacity(),
			"free": free
		})
	return info
Ejemplo n.º 51
0
    def updateStatus(self):
        print "[TVCharts] Status Update ..."
        self.DBStatusTimer.stop()

        if not config.plugins.tvcharts.enabled.value or Screens.Standby.inStandby:
            return

        # Get Channelname
        sref = self.session.nav.getCurrentlyPlayingServiceReference()
        if sref is not None:
            ref = eServiceReference(sref.toString())
            ref.setName("")
            serviceHandler = eServiceCenter.getInstance()
            info = serviceHandler.info(ref)
            channel_name = info and info.getName(ref).replace(
                '\xc2\x86', '').replace('\xc2\x87', '').decode(
                    "utf-8", "ignore").encode("utf-8") or ""
            self.serviceref = ref.toString()
        else:
            channel_name = ""
            self.serviceref = ""

        # Get Event Info
        service = self.session.nav.getCurrentService()
        info = service and service.info()
        event = info and info.getEvent(0)
        event_name = event and event.getEventName() or ""
        event_description = ""
        event_begin = 0

        if event is not None:
            curEvent = parseEvent(event)
            event_begin = int(
                curEvent[0]) + (config.recording.margin_before.getValue() * 60)
            event_description = event.getExtendedDescription()

        # Get Box Info
        self.BoxID = iNetwork.getAdapterAttribute("eth0", "mac")
        self.DeviceName = HardwareInfo().get_device_name()
        try:
            from enigma import getEnigmaVersionString
            from boxbranding import getImageVersion, getImageBuild
            self.EnigmaVersion = getEnigmaVersionString()
            self.ImageVersion = getImageVersion() + '.' + getImageBuild()
        except:
            self.EnigmaVersion = about.getEnigmaVersionString()
            self.ImageVersion = about.getVersionString()

        # Get TimerList
        self.timerlist = ""
        if config.plugins.tvcharts.submittimers.value and self.LastTimerlistUpdate <= (
                time() - 1800):
            self.LastTimerlistUpdate = time()
            try:
                for timer in self.recordtimer.timer_list:
                    if timer.disabled == 0 and timer.justplay == 0:
                        self.timerlist += "%s|%s|%s|%s|%s|%s|%s\n" % (
                            timer.eit,
                            str(
                                int(timer.begin) +
                                (config.recording.margin_before.getValue() *
                                 60)),
                            str(
                                int(timer.end) -
                                (config.recording.margin_after.getValue() *
                                 60)), str(timer.service_ref), timer.name,
                            timer.service_ref.getServiceName().replace(
                                '\xc2\x86', '').replace('\xc2\x87', '').decode(
                                    "utf-8",
                                    "ignore").encode("utf-8"), timer.repeated)
            except Exception:
                print "[TVCharts] Error loading timers!"

        # Get Pluginlist
        if config.plugins.tvcharts.submitplugins.value and self.pluginlist == "":
            try:
                os_system(
                    "opkg list_installed | grep enigma2-plugin- > /tmp/plugins.txt"
                )
                for plugin in open('/tmp/plugins.txt', 'r'):
                    self.pluginlist += plugin[0:plugin.find(' - ')] + "\n"
                os_system("rm -f /tmp/plugins.txt")
            except Exception:
                print "[TVCharts] Error loading plugins!"

        # Status Update
        getPage(
            url='http://www.dreambox-plugins.de/feeds/TVCharts/status.php',
            agent="Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)",
            timeout=60,
            method='POST',
            headers={
                'Content-Type': 'application/x-www-form-urlencoded'
            },
            postdata=urlencode({
                'boxid': self.BoxID,
                'devicename': self.DeviceName,
                'imageversion': self.ImageVersion,
                'enigmaversion': self.EnigmaVersion,
                'lastchannel': channel_name,
                'lastevent': event_name,
                'eventdescr': event_description,
                'lastbegin': event_begin,
                'lastserviceref': self.serviceref,
                'timerlist': self.timerlist,
                'pluginlist': self.pluginlist
            })).addErrback(self.updateError)

        # Restart Timer
        self.DBStatusTimer.start(900000, True)
Ejemplo n.º 52
0
	def getEnigmaVersionString():
		return about.getEnigmaVersionString()
Ejemplo n.º 53
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('About'))
        hddsplit, = skin.parameters.get('AboutHddSplit', (0, ))
        bhVer = 'Black Hole'
        f = open('/etc/bhversion', 'r')
        bhVer = f.readline().strip()
        f.close()
        bhRev = ''
        f = open('/etc/bhrev', 'r')
        bhRev = f.readline().strip()
        f.close()
        driverdate = self.getDriverInstalledDate()
        if driverdate == 'unknown':
            driverdate = self.getDriverInstalledDate_proxy()
        self['DriverVersion'] = StaticText(_('DVB drivers: ') + driverdate)
        self['KernelVersion'] = StaticText(
            _('Kernel version: ') + self.getKernelVersionString())
        self['FPVersion'] = StaticText(
            'Support: REDOUANE [email protected]')
        self['CpuInfo'] = StaticText(_('CPU: ') + self.getCPUInfoString())
        AboutText = _('Hardware: ') + about.getHardwareTypeString() + '\n'
        AboutText += _('CPU: ') + about.getCPUInfoString() + '\n'
        AboutText += _('Image: ') + about.getImageTypeString() + '\n'
        AboutText += _('Installed: ') + about.getFlashDateString() + '\n'
        AboutText += _(
            'Kernel version: ') + about.getKernelVersionString() + '\n'
        self["ImageVersion"] = StaticText("Enigma: " +
                                          about.getEnigmaVersionString())
        self["EnigmaVersion"] = StaticText("Firmware: " + bhVer + " " + bhRev)
        AboutText += _(
            'Enigma (re)starts: %d\n') % config.misc.startCounter.value
        GStreamerVersion = 'GStreamer: ' + about.getGStreamerVersionString(
        ).replace('GStreamer', '')
        self['GStreamerVersion'] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + '\n'
        AboutText += _('DVB drivers: ') + about.getDriverInstalledDate() + '\n'
        AboutText += _(
            'Python version: ') + about.getPythonVersionString() + '\n'
        self['TunerHeader'] = StaticText(_('Detected NIMs:'))
        AboutText += '\n' + _('Detected NIMs:') + '\n'
        nims = nimmanager.nimList(showFBCTuners=False)
        for count in range(len(nims)):
            if count < 4:
                self['Tuner' + str(count)] = StaticText(nims[count])
            else:
                self['Tuner' + str(count)] = StaticText('')
            AboutText += nims[count] + '\n'

        self['HDDHeader'] = StaticText(_('Detected HDD:'))
        AboutText += '\n' + _('Detected HDD:') + '\n'
        hddlist = harddiskmanager.HDDList()
        hddinfo = ''
        if hddlist:
            formatstring = hddsplit and '%s:%s, %.1f %sB %s' or '%s\n(%s, %.1f %sB %s)'
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += '\n'
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, 'G',
                                               _('free'))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), 'M', _('free'))

        else:
            hddinfo = _('none')
        self['hddA'] = StaticText(hddinfo)
        AboutText += hddinfo + "\n\n" + _("Network Info:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\n" + x[0] + ": " + x[1]

        self['AboutScrollLabel'] = ScrollLabel(AboutText)
        self['key_green'] = Button(_('Translations'))
        self['key_red'] = Button(_('Latest Commits'))
        self['key_blue'] = Button(_('Memory Info'))
        self['actions'] = ActionMap(
            ['ColorActions', 'SetupActions', 'DirectionActions'], {
                'cancel': self.close,
                'ok': self.close,
                'red': self.showCommits,
                'green': self.showTranslationInfo,
                'blue': self.showMemoryInfo,
                'up': self['AboutScrollLabel'].pageUp,
                'down': self['AboutScrollLabel'].pageDown
            })
Ejemplo n.º 54
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("About"))
		hddsplit = skin.parameters.get("AboutHddSplit", 0)

		AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
		cpu = about.getCPUInfoString()
		AboutText += _("CPU: ") + cpu + "\n"
		AboutText += _("Image: ") + about.getImageTypeString() + "\n"
		AboutText += _("Build date: ") + about.getBuildDateString() + "\n"
		AboutText += _("Last update: ") + about.getUpdateDateString() + "\n"

		# [WanWizard] Removed until we find a reliable way to determine the installation date
		# AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

		EnigmaVersion = about.getEnigmaVersionString()
		EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2)
		if len(EnigmaVersion) == 3:
			EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[2] + "-" + EnigmaVersion[1] + ")"
		else:
			EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")"
		EnigmaVersion = _("Enigma version: ") + EnigmaVersion
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += "\n" + EnigmaVersion + "\n"

		AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n"

		AboutText += _("DVB driver version: ") + about.getDriverInstalledDate() + "\n"

		GStreamerVersion = _("GStreamer version: ") + about.getGStreamerVersionString(cpu).replace("GStreamer","")
		self["GStreamerVersion"] = StaticText(GStreamerVersion)
		AboutText += GStreamerVersion + "\n"

		AboutText += _("Python version: ") + about.getPythonVersionString() + "\n"

		AboutText += _("Enigma (re)starts: %d\n") % config.misc.startCounter.value
		AboutText += _("Enigma debug level: %d\n") % eGetEnigmaDebugLvl()

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %s") % fp_version
			AboutText += fp_version + "\n"

		self["FPVersion"] = StaticText(fp_version)
		
		skinWidth = getDesktop(0).size().width()
		skinHeight = getDesktop(0).size().height()
		AboutText += _("Skin Name: %s") % config.skin.primary_skin.value[0:-9] + _("  (%s x %s)") % (skinWidth, skinHeight) + "\n"

		if path.exists('/etc/enigma2/EtRcType'):
			rfp = open('/etc/enigma2/EtRcType', "r")
			Remote = rfp.read()
			rfp.close
			AboutText += _("Remote control type") + _(": ") + Remote + "\n"
		else:
			AboutText += _("Remote control type") + _(": ") + iRcTypeControl.getBoxType() + "\n"

		if path.exists('/proc/stb/ir/rc/type'):
			fp = open('/proc/stb/ir/rc/type', "r")
			RcID = fp.read()
			fp.close
			AboutText += _("Remote control ID") + _(": ") + RcID

		AboutText += _('Skin & Resolution: %s (%sx%s)\n') % (config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height())

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		AboutText += "\n" + _("Detected NIMs:") + "\n"

		nims = nimmanager.nimListCompressed()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		AboutText += "\n" + _("Detected HDD:") + "\n"

		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free()/1024.0, "G", _("free"))
				else:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free(), "M", _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo + "\n\n" + _("Network Info:")
		for x in about.GetIPsFromNetworkInterfaces():
			AboutText += "\n" + x[0] + ": " + x[1]

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
		self["key_green"] = Button(_("Troubleshoot"))
		self["key_red"] = Button(_("Latest Commits"))
		self["key_yellow"] = Button(_("Memory Info"))
		self["key_blue"] = Button(_("%s ") % getMachineName() + _("picture"))

		self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions", "ChannelSelectEPGActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"info": self.showTranslationInfo,
				"red": self.showCommits,
				"green": self.showTroubleshoot,
				"yellow": self.showMemoryInfo,
				"blue": self.showModelPic,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			})
Ejemplo n.º 55
0
    def updateInfo(self):
        rc = system("df -h > /tmp/syinfo.tmp")
        text = _("BOX\n") + _("Brand:") + "\t" + getMachineBrand() + "\n"
        f = open("/proc/stb/info/model", 'r')
        text += _("Model:\t") + f.readline()
        f.close()

        if about.getChipSetString() != _("unavailable"):
            if SystemInfo["HasHiSi"]:
                text += _("Chipset:\tHiSilicon %s\n") % about.getChipSetString(
                ).upper()
            elif about.getIsBroadcom():
                text += _("Chipset:\tBroadcom %s\n") % about.getChipSetString(
                ).upper()
            else:
                text += _("Chipset:\t%s\n") % about.getChipSetString().upper()

        text += _("MEMORY\n")
        memTotal = memFree = swapTotal = swapFree = 0
        for line in open("/proc/meminfo", 'r'):
            parts = line.split(':')
            key = parts[0].strip()
            if key == "MemTotal":
                memTotal = parts[1].strip()
            elif key in ("MemFree", "Buffers", "Cached"):
                memFree += int(parts[1].strip().split(' ', 1)[0])
            elif key == "SwapTotal":
                swapTotal = parts[1].strip()
            elif key == "SwapFree":
                swapFree = parts[1].strip()
        text += _("Total memory:") + "\t%s\n" % memTotal
        text += _("Free memory:") + "\t%s kB\n" % memFree
        text += _("Swap total:") + "\t%s \n" % swapTotal
        text += _("Swap free:") + "\t%s \n" % swapFree
        text += "\n" + _("STORAGE") + "\n"
        f = open("/tmp/syinfo.tmp", 'r')
        line = f.readline()
        parts = line.split()
        text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip(
        ) + "    " + parts[3].strip() + "    " + parts[4] + "\n"
        line = f.readline()
        parts = line.split()
        text += _("Flash") + "\t" + parts[1].strip() + "  " + parts[2].strip(
        ) + "  " + parts[3].strip() + "  " + parts[4] + "\n"
        for line in f.readlines():
            if line.find('/media/') != -1:
                line = line.replace('/media/', '   ')
                parts = line.split()
                if len(parts) == 6:
                    text += parts[5] + "\t" + parts[1].strip(
                    ) + "  " + parts[2].strip() + "  " + parts[3].strip(
                    ) + "  " + parts[4] + "\n"
        f.close()
        os_remove("/tmp/syinfo.tmp")

        text += "\n" + _("SOFTWARE") + "\n"
        f = open("/etc/bpversion", 'r')
        text += "Firmware v.:\t" + f.readline()
        f.close()
        text += "Enigma2 v.: \t" + about.getEnigmaVersionString() + "\n"
        text += "Kernel v.: \t" + about.getKernelVersionString() + "\n"

        self["lab1"].setText(text)
Ejemplo n.º 56
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self["Model"] = StaticText(api.enigma2.systeminfo.modelname())
		self["EnigmaVersion"] = StaticText("Dreambox OS: " + about.getEnigmaVersionString())
		self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %s") % fp_version

		self["FPVersion"] = StaticText(fp_version)

		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3, 4):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		hdd = None
		hddlist = harddiskmanager.HDDList()
		defaultDisk = harddiskmanager.getDefaultStorageDevicebyUUID(config.storage_options.default_device.value)
		if defaultDisk:
			default_hdd = "/dev/%s" %(defaultDisk.device,)
			for hd in hddlist:
				hd = hd[1]
				if default_hdd.startswith(hd.getDeviceDir()):
					Log.i("Default HDD matched! (%s -> %s)" %(default_hdd,hd.getDeviceDir()))
					hdd = hd
					break
		if not hdd:
			hdd = hddlist and hddlist[0][1] or None
			Log.w("No default Harddisk found. Falling back to first in list -> %s" %(hdd,))

		if hdd is not None and hdd.model() != "":
			self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
		else:
			self["hddA"] = StaticText(_("none"))

		self["IPHeader"] = StaticText(_("Current IP Address:"))

		ipA = _("none")
		services = eNetworkManager.getInstance().getServices()
		for service in services:
			ip = self.getServiceIP(service)
			name = service.name()
			if ip != None:
				ipA = "%s (%s)" %(ip, name)
		self["ipA"] = StaticText(ipA)
		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo
			})
Ejemplo n.º 57
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("About"))
		hddsplit = skin.parameters.get("AboutHddSplit", 0)

		model = getBoxType()

		procmodel = getBoxProc()

		stbplatform = boxbranding.getMachineBuild()

		AboutText = _("Hardware: ") + model + "\n"
		if stbplatform != model:
			AboutText += _("Platform: ") + stbplatform + "\n"
		if procmodel != model:
			AboutText += _("Proc model: ") + procmodel + "\n"

		procmodeltype = getBoxProcType()
		if procmodeltype is not None and procmodeltype != "unknown":
			AboutText += _("Hardware type: ") + procmodeltype + "\n"

		hwserial = getHWSerial()
		if hwserial is not None and hwserial != "unknown":
			AboutText += _("Hardware serial: ") + hwserial + "\n"
		if hwserial is not None and hwserial == "unknown":
			AboutText += _("Hardware serial: ") + about.getCPUSerial() + "\n"

		AboutText += _("Brand/Meta: ") + getBoxBrand() + "\n"

		AboutText += "\n"
		cpu = about.getCPUInfoString()
		AboutText += _("CPU: ") + cpu + "\n"
		AboutText += _("CPU brand: ") + about.getCPUBrand() + "\n"

		socfamily = boxbranding.getSoCFamily()
		if socfamily is not None:
			AboutText += _("SoC family: ") + socfamily + "\n"

		AboutText += _("CPU architecture: ") + about.getCPUArch() + "\n"

		if not boxbranding.getDisplayType().startswith(' '):
			AboutText += "\n"
			AboutText += _("Display type: ") + boxbranding.getDisplayType() + "\n"

		# [WanWizard] Removed until we find a reliable way to determine the installation date
		# AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

		EnigmaVersion = about.getEnigmaVersionString()
		EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2)
		if len(EnigmaVersion) == 3:
			EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[2] + "-" + EnigmaVersion[1] + ")"
		else:
			EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")"
		EnigmaVersion = _("Enigma2 version: ") + EnigmaVersion
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		AboutText += "\n" + EnigmaVersion + "\n"
		AboutText += _("Last update: ") + about.getUpdateDateString() + "\n"
		AboutText += _("Enigma2 (re)starts: %d\n") % config.misc.startCounter.value
		AboutText += _("Enigma2 debug level: %d\n") % eGetEnigmaDebugLvl()

		if fileExists("/etc/openvision/mediaservice"):
			mediaservice = open("/etc/openvision/mediaservice", "r").read().strip()
			AboutText += _("Media service: ") + mediaservice.replace("enigma2-plugin-systemplugins-","") + "\n"

		AboutText += "\n"

		AboutText += _("Drivers version: ") + about.getDriverInstalledDate() + "\n"
		AboutText += _("Kernel version: ") + boxbranding.getKernelVersion() + "\n"

		GStreamerVersion = _("GStreamer version: ") + about.getGStreamerVersionString(cpu).replace("GStreamer","")
		self["GStreamerVersion"] = StaticText(GStreamerVersion)
		AboutText += "\n" + GStreamerVersion + "\n"

		FFmpegVersion = _("FFmpeg version: ") + about.getFFmpegVersionString()
		self["FFmpegVersion"] = StaticText(FFmpegVersion)
		AboutText += FFmpegVersion + "\n"

		AboutText += "\n"
		AboutText += _("Python version: ") + about.getPythonVersionString() + "\n"
		AboutText += "\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %s") % fp_version

			AboutText += fp_version + "\n"

		self["FPVersion"] = StaticText(fp_version)

		AboutText += _('Skin & Resolution: %s (%sx%s)\n') % (config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height())

		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		AboutText += "\n"
		AboutText += _("Detected NIMs:") + "\n"

		nims = nimmanager.nimListCompressed()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))
		AboutText += "\n"
		AboutText += _("Detected HDD:") + "\n"

		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.Totalfree()/1024.0, "G", _("free"))
				else:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.Totalfree(), "M", _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo + "\n\n" + _("Network Info:")
		for x in about.GetIPsFromNetworkInterfaces():
			AboutText += "\n" + x[0] + ": " + x[1]
		AboutText += '\n\n' + _("Uptime") + ": " + about.getBoxUptime()

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
		self["key_green"] = Button(_("Translations"))
		self["key_red"] = Button(_("Latest Commits"))
		self["key_yellow"] = Button(_("Troubleshoot"))
		self["key_blue"] = Button(_("Memory Info"))

		self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"red": self.showCommits,
				"green": self.showTranslationInfo,
				"blue": self.showMemoryInfo,
				"yellow": self.showTroubleshoot,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			})
Ejemplo n.º 58
0
Archivo: About.py Proyecto: trunca/pena
    def __init__(self, session):
        Screen.__init__(self, session)
        hddsplit = skin.parameters.get("AboutHddSplit", 0)

        #AboutHddSplit = 0
        #try:
        #	hddsplit = skin.parameters.get("AboutHddSplit",(0))[0]
        #except:
        #	hddsplit = AboutHddSplit

        if boxtype == 'gb800solo':
            BoxName = "GigaBlue HD 800SOLO"
        elif boxtype == 'gb800se':
            BoxName = "GigaBlue HD 800SE"
        elif boxtype == 'gb800ue':
            BoxName = "GigaBlue HD 800UE"
        elif boxtype == 'gbquad':
            BoxName = "GigaBlue Quad"
        elif boxtype == 'gbquad4k':
            BoxName = "GigaBlue Quad 4k"
        elif boxtype == 'gbue4k':
            BoxName = "GigaBlue UE 4k"
        elif boxtype == 'gbquadplus':
            BoxName = "GigaBlue HD Quadplus"
        elif boxtype == 'gb800seplus':
            BoxName = "GigaBlue HD 800SEplus"
        elif boxtype == 'gb800ueplus':
            BoxName = "GigaBlue HD 800UEplus"
        elif boxtype == 'gbipbox':
            BoxName = "GigaBlue IP Box"
        elif boxtype == 'gbultra':
            BoxName = "GigaBlue HD Ultra"
        elif boxtype == 'gbultraue':
            BoxName = "GigaBlue HD Ultra UE"
        elif boxtype == 'gbultraueh':
            BoxName = "GigaBlue HD Ultra UEh"
        elif boxtype == 'gbultrase':
            BoxName = "GigaBlue HD Ultra SE"
        elif boxtype == 'gbx1':
            BoxName = "GigaBlue X1"
        elif boxtype == 'gbx2':
            BoxName = "GigaBlue X2"
        elif boxtype == 'gbx3':
            BoxName = "GigaBlue X3"
        elif boxtype == 'gbx3h':
            BoxName = "GigaBlue X3h"
        elif boxtype == 'spycat':
            BoxName = "XCORE Spycat"
        elif boxtype == 'quadbox2400':
            BoxName = "AX Quadbox HD2400"
        else:
            BoxName = about.getHardwareTypeString()

        self.setTitle(_("About") + " " + BoxName)

        ImageType = about.getImageTypeString()
        self["ImageType"] = StaticText(ImageType)

        Boxserial = popen('cat /proc/stb/info/sn').read().strip()
        serial = ""
        if Boxserial != "":
            serial = ":Serial : " + Boxserial

        AboutHeader = _("About") + " " + BoxName
        self["AboutHeader"] = StaticText(AboutHeader)

        AboutText = BoxName + " - " + ImageType + serial + "\n"

        #AboutText += _("Hardware: ") + about.getHardwareTypeString() + "\n"
        #AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
        #AboutText += _("Installed: ") + about.getFlashDateString() + "\n"
        #AboutText += _("Image: ") + about.getImageTypeString() + "\n"

        CPUinfo = _("CPU: ") + about.getCPUInfoString()
        self["CPUinfo"] = StaticText(CPUinfo)
        AboutText += CPUinfo + "\n"

        CPUspeed = _("Speed: ") + about.getCPUSpeedString()
        self["CPUspeed"] = StaticText(CPUspeed)
        #AboutText += "(" + about.getCPUSpeedString() + ")\n"

        ChipsetInfo = _("Chipset: ") + about.getChipSetString()
        self["ChipsetInfo"] = StaticText(ChipsetInfo)
        AboutText += ChipsetInfo + "\n"

        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %s") % fp_version
            #AboutText += fp_version +"\n"
        self["FPVersion"] = StaticText(fp_version)

        AboutText += "\n"

        KernelVersion = _("Kernel version: ") + about.getKernelVersionString()
        self["KernelVersion"] = StaticText(KernelVersion)
        AboutText += KernelVersion + "\n"

        if getMachineBuild() == 'gb7252':
            b = popen('cat /proc/stb/info/version').read().strip()
            driverdate = str(b[0:4] + '-' + b[4:6] + '-' + b[6:8] + ' ' +
                             b[8:10] + ':' + b[10:12] + ':' + b[12:14])
            AboutText += _("DVB drivers: ") + driverdate + "\n"
        else:
            AboutText += _("DVB drivers: ") + self.realDriverDate() + "\n"
            #AboutText += _("DVB drivers: ") + about.getDriverInstalledDate() + "\n"

        ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
        self["ImageVersion"] = StaticText(ImageVersion)
        AboutText += ImageVersion + "\n"

        EnigmaVersion = _(
            "GUI Build: ") + about.getEnigmaVersionString() + "\n"
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        #AboutText += EnigmaVersion

        #AboutText += _("Enigma (re)starts: %d\n") % config.misc.startCounter.value

        FlashDate = _("Flashed: ") + about.getFlashDateString()
        self["FlashDate"] = StaticText(FlashDate)
        AboutText += FlashDate + "\n"

        EnigmaSkin = _("Skin: ") + config.skin.primary_skin.value[0:-9]
        self["EnigmaSkin"] = StaticText(EnigmaSkin)
        AboutText += EnigmaSkin + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n"

        GStreamerVersion = _("GStreamer: ") + about.getGStreamerVersionString(
        ).replace("GStreamer", "")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + "\n"

        twisted = popen('opkg list-installed  |grep -i python-twisted-core'
                        ).read().strip().split(' - ')[1]
        AboutText += "Python-Twisted: " + str(twisted) + "\n"

        AboutText += "\n"
        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        #AboutText += _("Detected NIMs:") + "\n"

        nims = nimmanager.nimList()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))

        AboutText += "\n"
        #AboutText +=  _("Detected HDD:") + "\n"
        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s:(%s, %.1f %sB %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, "G",
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), "M", _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo

        #AboutText += "\n\n" + _("Network Info")
        #for x in about.GetIPsFromNetworkInterfaces():
        #	AboutText += "\n" + iNetwork.getFriendlyAdapterDescription(x[0]) + " :" + "/dev/" + x[0] + " " + x[1]

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Translations"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_yellow"] = Button(_("Troubleshoot"))
        self["key_blue"] = Button(_("Memory Info"))
        self["key_info"] = Button(_("Contact Info"))
        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "red": self.showCommits,
                "green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "info": self.showContactInfo,
                "yellow": self.showTroubleshoot,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Ejemplo n.º 59
0
    def __init__(self, session):
        Screen.__init__(self, session)

        from Tools.HardwareInfo import HardwareInfo
        model = HardwareInfo().get_device_name()
        if model == "optimussos2":
            AboutText = _("Hardware: ") + "OPTIMUSS OS2" + "\n"
        elif model == "optimussos1":
            AboutText = _("Hardware: ") + "OPTIMUSS OS1" + "\n"
        else:
            AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"

        import fcntl, socket, struct

        def getHwAddr(ifname):
            s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
            info = fcntl.ioctl(s.fileno(), 0x8927,
                               struct.pack('256s', ifname[:15]))
            return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1]

        macaddress = getHwAddr("eth0")
        self["MacAddress"] = StaticText(_("Mac Address:") + " " + macaddress)
        AboutText += _("Mac Address:") + " " + macaddress + "\n"

        if HardwareInfo().has_micom():
            AboutText += _(
                "Micom Version: ") + about.getMicomVersionString() + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"

        EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += EnigmaVersion + "\n"

        ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
        self["ImageVersion"] = StaticText(ImageVersion)
        AboutText += ImageVersion + "\n"

        # [iq
        if model == "mediabox":
            AboutText += _("Powered by Jepssen") + "\n"
        elif model == "optimussos1" or model == "optimussos2":
            AboutText += _("Powered by Edision") + "\n"
        else:
            AboutText += _("Powered by 4D") + "\n"


# iq]
# [iq
#		fp_version = getFPVersion()
#		if fp_version is None:
#			fp_version = ""
#		else:
#			fp_version = _("Frontprocessor version: %d") % fp_version
#			AboutText += fp_version + "\n"
#
#		self["FPVersion"] = StaticText(fp_version)
# iq]

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimList()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += "%s\n(%s, %d GB %s)" % (
                        hdd.model(), hdd.capacity(), hdd.free() / 1024,
                        _("free"))
                else:
                    hddinfo += "%s\n(%s, %d MB %s)" % (
                        hdd.model(), hdd.capacity(), hdd.free(), _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo
        self["AboutScrollLabel"] = ScrollLabel(AboutText)

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "green": self.showTranslationInfo,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })

        self["hidden_action"] = ActionMap(
            ["ColorActions"], {
                "red": self.red_action,
                "blue": self.blue_action,
                "info": self.info_action,
                "1": self.first_action,
                "2": self.second_action,
                "3": self.third_action,
            }, -1)

        self.key_status = -1