Example #1
0
	def realDriverDate(self):
		realdate = about.getDriverInstalledDate()
		try:
			y = popen('lsmod').read().strip()
			if 'dvb' in y:
				drivername='dvb'
				b = popen('modinfo '+ drivername +' |grep -i version').read().strip().split()[1][:14]
				realdate=str(b[0:4] + '-' + b[4:6] + '-' + b[6:8] + ' ' + b[8:10]  + ':' + b[10:12] + ':' + b[12:14])
		except:
			realdate = about.getDriverInstalledDate()
		return realdate
Example #2
0
	def realDriverDate(self):
		realdate = about.getDriverInstalledDate()
		try:
			y = popen('lsmod').read().strip()
			if 'dvb' in y:
				drivername='dvb'
				b = popen('modinfo '+ drivername +' |grep -i version').read().strip().split()[1][:14]
				realdate=str(b[0:4] + '-' + b[4:6] + '-' + b[6:8] + ' ' + b[8:10]  + ':' + b[10:12] + ':' + b[12:14])
		except:
			realdate = about.getDriverInstalledDate()
		return realdate
Example #3
0
 def realDriverDate(self):
     realdate = about.getDriverInstalledDate()
     try:
         y = popen('lsmod').read().strip()
         if 'dvb' in y:
             drivername = 'dvb'
             x = popen('modinfo ' + drivername + ' |grep -i version')
             x = x.read().strip().split()
             date = x[1]
             date = date[:14]
             b = date
             YY = b[0:4]
             MM = b[4:6]
             DD = b[6:8]
             HO = b[8:10]
             MI = b[10:12]
             SE = b[12:14]
             realdate = str(DD + '.' + MM + '.' + YY + ' - ' + HO + ':' +
                            MI + ':' + SE)
     except:
         realdate = about.getDriverInstalledDate()
     return realdate
Example #4
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()
Example #5
0
def getInfo(session=None, need_fullinfo=False):
    # TODO: get webif versione somewhere!
    info = {}
    global STATICBOXINFO

    if not (STATICBOXINFO is None or need_fullinfo):
        return STATICBOXINFO

    info['brand'] = getBoxBrand()
    info['model'] = getBoxType()
    info['platform'] = boxbranding.getMachineBuild()

    try:
        info['procmodel'] = getBoxProc()
    except:  # noqa: E722
        info['procmodel'] = boxbranding.getMachineProcModel()

    try:
        info['procmodeltype'] = getBoxProcType()
    except:  # noqa: E722
        info['procmodeltype'] = None

    try:
        info['lcd'] = getLcd()
    except:  # noqa: E722
        info['lcd'] = 0

    try:
        info['grabpip'] = getGrabPip()
    except:  # noqa: E722
        info['grabpip'] = 0

    cpu = about.getCPUInfoString()
    info['chipset'] = cpu
    info['cpubrand'] = about.getCPUBrand()
    info['socfamily'] = boxbranding.getSoCFamily()
    info['cpuarch'] = about.getCPUArch()
    if config.OpenWebif.about_benchmark.value is True:
        info['cpubenchmark'] = about.getCPUBenchmark()
    else:
        info['cpubenchmark'] = _("Disabled in configuration")
    info['flashtype'] = about.getFlashType()

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

    info['uptime'] = about.getBoxUptime()

    info["webifver"] = OPENWEBIFVER
    info['imagedistro'] = boxbranding.getImageDistro()
    info['oever'] = boxbranding.getImageBuild()
    info['visionversion'] = boxbranding.getVisionVersion()
    info['visionrevision'] = boxbranding.getVisionRevision()
    info['visionmodule'] = about.getVisionModule()

    if fileExists("/etc/openvision/multiboot"):
        multibootflag = open("/etc/openvision/multiboot", "r").read().strip()
        if multibootflag == "1":
            info['multiboot'] = _("Yes")
        else:
            info['multiboot'] = _("No")
    else:
        info['multiboot'] = _("Yes")

    info['enigmaver'] = getEnigmaVersionString()
    info['driverdate'] = about.getDriverInstalledDate()
    info['kernelver'] = boxbranding.getKernelVersion()
    info['dvbapitype'] = about.getDVBAPI()
    info['gstreamerversion'] = about.getGStreamerVersionString(cpu)
    info['ffmpegversion'] = about.getFFmpegVersionString()
    info['pythonversion'] = about.getPythonVersionString()

    try:
        info['hwserial'] = getHWSerial()
    except:  # noqa: E722
        info['hwserial'] = None

    if (info['hwserial'] is None or info['hwserial'] == "unknown"):
        info['hwserial'] = about.getCPUSerial()

    try:
        info['boxrctype'] = getBoxRCType()
    except:  # noqa: E722
        info['boxrctype'] = None

    if (info['boxrctype'] is None or info['boxrctype'] == "unknown"):
        if fileExists("/usr/bin/remotecfg"):
            info['boxrctype'] = _("Amlogic remote")
        elif fileExists("/usr/sbin/lircd"):
            info['boxrctype'] = _("LIRC remote")

    info['ovrctype'] = boxbranding.getRCType()
    info['ovrcname'] = boxbranding.getRCName()
    info['ovrcidnum'] = boxbranding.getRCIDNum()

    info['transcoding'] = boxbranding.getHaveTranscoding()
    info['multitranscoding'] = boxbranding.getHaveMultiTranscoding()

    info['displaytype'] = boxbranding.getDisplayType()

    info['updatedatestring'] = about.getUpdateDateString()
    info['enigmadebuglvl'] = eGetEnigmaDebugLvl()

    info['imagearch'] = boxbranding.getImageArch()
    info['imagefolder'] = boxbranding.getImageFolder()
    info['imagefilesystem'] = boxbranding.getImageFileSystem()
    info['feedsurl'] = boxbranding.getFeedsUrl()
    info['developername'] = boxbranding.getDeveloperName()
    info['builddatestring'] = about.getBuildDateString()
    info['imagefpu'] = boxbranding.getImageFPU()
    info['havemultilib'] = boxbranding.getHaveMultiLib()

    try:
        info['fp_version'] = getFPVersion()
    except:  # noqa: E722
        info['fp_version'] = None

    info['tuners'] = []
    for i in list(range(0, nimmanager.getSlotCount())):
        print(
            "[OpenWebif] -D- tuner '%d' '%s' '%s'" %
            (i, nimmanager.getNimName(i), nimmanager.getNim(i).getSlotName()))
        info['tuners'].append({
            "name":
            nimmanager.getNim(i).getSlotName(),
            "type":
            nimmanager.getNimName(i) + " (" +
            nimmanager.getNim(i).getFriendlyType() + ")",
            "rec":
            "",
            "live":
            ""
        })

    info['ifaces'] = []
    ifaces = iNetwork.getConfiguredAdapters()
    for iface in ifaces:
        info['ifaces'].append({
            "name":
            iNetwork.getAdapterName(iface),
            "friendlynic":
            getFriendlyNICChipSet(iface),
            "linkspeed":
            getLinkSpeed(iface),
            "mac":
            iNetwork.getAdapterAttribute(iface, "mac"),
            "dhcp":
            iNetwork.getAdapterAttribute(iface, "dhcp"),
            "ipv4method":
            getIPv4Method(iface),
            "ip":
            formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
            "mask":
            formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
            "v4prefix":
            sum([
                bin(int(x)).count('1') for x in formatIp(
                    iNetwork.getAdapterAttribute(iface, "netmask")).split('.')
            ]),
            "gw":
            formatIp(iNetwork.getAdapterAttribute(iface, "gateway")),
            "ipv6":
            getAdapterIPv6(iface)['addr'],
            "ipmethod":
            getIPMethod(iface),
            "firstpublic":
            getAdapterIPv6(iface)['firstpublic']
        })

    info['hdd'] = []
    for hdd in harddiskmanager.hdd:
        dev = hdd.findMount()
        if dev:
            stat = os.statvfs(dev)
            free = stat.f_bavail * stat.f_frsize / 1048576.
        else:
            free = -1

        if free <= 1024:
            free = "%i %s" % (free, _("MB"))
        else:
            free = free / 1024.
            free = "%.1f %s" % (free, _("GB"))

        size = hdd.diskSize() * 1000000 / 1048576.
        if size > 1048576:
            size = "%.1f %s" % ((size / 1048576.), _("TB"))
        elif size > 1024:
            size = "%.1f %s" % ((size / 1024.), _("GB"))
        else:
            size = "%d %s" % (size, _("MB"))

        iecsize = hdd.diskSize()
        # Harddisks > 1000 decimal Gigabytes are labelled in TB
        if iecsize > 1000000:
            iecsize = (iecsize + 50000) // float(100000) / 10
            # Omit decimal fraction if it is 0
            if (iecsize % 1 > 0):
                iecsize = "%.1f %s" % (iecsize, _("TB"))
            else:
                iecsize = "%d %s" % (iecsize, _("TB"))
        # Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB
        elif iecsize > 300000:
            iecsize = "%d %s" % (((iecsize + 5000) // 10000 * 10), _("GB"))
        # ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB
        elif iecsize > 1000:
            iecsize = "%d %s" % (((iecsize + 500) // 1000), _("GB"))
        else:
            iecsize = "%d %s" % (iecsize, _("MB"))

        info['hdd'].append({
            "model":
            hdd.model(),
            "capacity":
            size,
            "labelled_capacity":
            iecsize,
            "free":
            free,
            "mount":
            dev,
            "friendlycapacity":
            _("%s free / %s total") % (free, size + ' ("' + iecsize + '")')
        })

    info['shares'] = []
    autofiles = ('/etc/auto.network', '/etc/auto.network_vti')
    for autofs in autofiles:
        if fileExists(autofs):
            method = "autofs"
            for line in open(autofs).readlines():
                if not line.startswith('#'):
                    # Replace escaped spaces that can appear inside credentials with underscores
                    # Not elegant but we wouldn't want to expose credentials on the OWIF anyways
                    tmpline = line.replace("\ ", "_")
                    tmp = tmpline.split()
                    if not len(tmp) == 3:
                        continue
                    name = tmp[0].strip()
                    type = "unknown"
                    if "cifs" in tmp[1]:
                        # Linux still defaults to SMBv1
                        type = "SMBv1.0"
                        settings = tmp[1].split(",")
                        for setting in settings:
                            if setting.startswith("vers="):
                                type = setting.replace("vers=", "SMBv")
                    elif "nfs" in tmp[1]:
                        type = "NFS"

                    # Default is r/w
                    mode = _("r/w")
                    settings = tmp[1].split(",")
                    for setting in settings:
                        if setting == "ro":
                            mode = _("r/o")

                    uri = tmp[2]
                    parts = []
                    parts = tmp[2].split(':')
                    if parts[0] == "":
                        server = uri.split('/')[2]
                        uri = uri.strip()[1:]
                    else:
                        server = parts[0]

                    ipaddress = None
                    if server:
                        # Will fail on literal IPs
                        try:
                            # Try IPv6 first, as will Linux
                            if has_ipv6:
                                tmpaddress = None
                                tmpaddress = getaddrinfo(server, 0, AF_INET6)
                                if tmpaddress:
                                    ipaddress = "[" + list(
                                        tmpaddress)[0][4][0] + "]"
                            # Use IPv4 if IPv6 fails or is not present
                            if ipaddress is None:
                                tmpaddress = None
                                tmpaddress = getaddrinfo(server, 0, AF_INET)
                                if tmpaddress:
                                    ipaddress = list(tmpaddress)[0][4][0]
                        except:  # noqa: E722
                            pass

                    friendlyaddress = server
                    if ipaddress is not None and not ipaddress == server:
                        friendlyaddress = server + " (" + ipaddress + ")"
                    info['shares'].append({
                        "name": name,
                        "method": method,
                        "type": type,
                        "mode": mode,
                        "path": uri,
                        "host": server,
                        "ipaddress": ipaddress,
                        "friendlyaddress": friendlyaddress
                    })
    # TODO: fstab

    info['EX'] = ''

    if session:
        try:
            #  gets all current stream clients for images using eStreamServer
            #  TODO: merge eStreamServer and streamList
            #  TODO: get tuner info for streams
            #  TODO: get recoding/timer info if more than one
            info['streams'] = []
            try:
                from enigma import eStreamServer
                streamServer = eStreamServer.getInstance()
                if streamServer is not None:
                    for x in streamServer.getConnectedClients():
                        servicename = ServiceReference(
                            x[1]).getServiceName() or "(unknown service)"
                        if int(x[2]) == 0:
                            strtype = "S"
                        else:
                            strtype = "T"
                        info['streams'].append({
                            "ref": x[1],
                            "name": servicename,
                            "ip": x[0],
                            "type": strtype
                        })
            except Exception as error:
                print("[OpenWebif] -D- no eStreamServer %s" % error)
            recs = NavigationInstance.instance.getRecordings()
            if recs:
                #  only one stream and only TV
                from Plugins.Extensions.OpenWebif.controllers.stream import streamList
                s_name = ''
                # s_cip = ''

                print("[OpenWebif] -D- streamList count '%d'" %
                      len(streamList))
                if len(streamList) == 1:
                    from Screens.ChannelSelection import service_types_tv
                    # from enigma import eEPGCache
                    # epgcache = eEPGCache.getInstance()
                    serviceHandler = eServiceCenter.getInstance()
                    services = serviceHandler.list(
                        eServiceReference('%s ORDER BY name' %
                                          (service_types_tv)))
                    channels = services and services.getContent("SN", True)
                    s = streamList[0]
                    srefs = s.ref.toString()
                    for channel in channels:
                        if srefs == channel[0]:
                            s_name = channel[1] + ' (' + s.clientIP + ')'
                            break
                print("[OpenWebif] -D- s_name '%s'" % s_name)

                # only for debug
                for stream in streamList:
                    srefs = stream.ref.toString()
                    print("[OpenWebif] -D- srefs '%s'" % srefs)

                sname = ''
                timers = []
                for timer in NavigationInstance.instance.RecordTimer.timer_list:
                    if timer.isRunning() and not timer.justplay:
                        timers.append(
                            removeBad(timer.service_ref.getServiceName()))
                        print("[OpenWebif] -D- timer '%s'" %
                              timer.service_ref.getServiceName())


# TODO: more than one recording
                if len(timers) == 1:
                    sname = timers[0]

                if sname == '' and s_name != '':
                    sname = s_name

                print("[OpenWebif] -D- recs count '%d'" % len(recs))

                for rec in recs:
                    feinfo = rec.frontendInfo()
                    frontendData = feinfo and feinfo.getAll(True)
                    if frontendData is not None:
                        cur_info = feinfo.getTransponderData(True)
                        if cur_info:
                            nr = frontendData['tuner_number']
                            info['tuners'][nr]['rec'] = getOrbitalText(
                                cur_info) + ' / ' + sname

            service = session.nav.getCurrentService()
            if service is not None:
                sname = service.info().getName()
                feinfo = service.frontendInfo()
                frontendData = feinfo and feinfo.getAll(True)
                if frontendData is not None:
                    cur_info = feinfo.getTransponderData(True)
                    if cur_info:
                        nr = frontendData['tuner_number']
                        info['tuners'][nr]['live'] = getOrbitalText(
                            cur_info) + ' / ' + sname
        except Exception as error:
            info['EX'] = error

    info['timerpipzap'] = False
    info['timerautoadjust'] = False

    try:
        timer = RecordTimerEntry('', 0, 0, '', '', 0)
        if hasattr(timer, "pipzap"):
            info['timerpipzap'] = True
        if hasattr(timer, "autoadjust"):
            info['timerautoadjust'] = True
    except Exception as error:
        print("[OpenWebif] -D- RecordTimerEntry check %s" % error)

    STATICBOXINFO = info
    return info
Example #6
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
            })
Example #7
0
def getAboutText():
    AboutText = ""

    AboutText += _("Model:\t %s %s\n") % (getMachineBrand(), getMachineName())

    bootloader = ""
    if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
        f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
        bootloader = f.readline().replace('\x00', '').replace('\n', '')
        f.close()
        AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

    if about.getChipSetString() != _("unavailable"):
        if about.getIsBroadcom():
            AboutText += _("Chipset:\t BCM%s\n") % str(
                about.getChipSetString().upper())
        else:
            AboutText += _("Chipset:\t %s\n") % str(
                about.getChipSetString().upper())

    bogoMIPS = ""
    if path.exists('/proc/cpuinfo'):
        f = open('/proc/cpuinfo', 'r')
        temp = f.readlines()
        f.close()
        try:
            for lines in temp:
                lisp = lines.split(': ')
                if lisp[0].startswith('BogoMIPS'):
                    bogoMIPS = "" + str(int(float(lisp[1].replace('\n',
                                                                  '')))) + ""
                    #bogoMIPS = "" + lisp[1].replace('\n','') + ""
                    break
        except:
            pass

    cpuMHz = ""
    if getMachineBuild() in ('vusolo4k', 'vuultimo4k', 'vuzero4k'):
        cpuMHz = "   (1,5 GHz)"
    elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex',
                               'tiviaraplus'):
        cpuMHz = "   (1,3 GHz)"
    elif getMachineBuild() in ('u51', 'u5', 'u53', 'u52', 'u5pvr', 'h9'):
        cpuMHz = "   (1,6 GHz)"
    elif getMachineBuild() in ('vuuno4kse', 'vuuno4k', 'dm900', 'dm920',
                               'gb7252', 'dags7252', 'xc7439', '8100s'):
        cpuMHz = "   (1,7 GHz)"
    elif getMachineBuild() in ('alien5'):
        cpuMHz = "   (2,0 GHz)"
    elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51',
                               'sf4008', 'vs1500', 'h7'):
        try:
            import binascii
            f = open(
                '/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency',
                'rb')
            clockfrequency = f.read()
            f.close()
            cpuMHz = "   (%s MHz)" % str(
                round(int(binascii.hexlify(clockfrequency), 16) / 1000000, 1))
        except:
            cpuMHz = "   (1,7 GHz)"
    else:
        if path.exists('/proc/cpuinfo'):
            f = open('/proc/cpuinfo', 'r')
            temp = f.readlines()
            f.close()
            try:
                for lines in temp:
                    lisp = lines.split(': ')
                    if lisp[0].startswith('cpu MHz'):
                        #cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
                        cpuMHz = "   (" + str(
                            int(float(lisp[1].replace('\n', '')))) + " MHz)"
                        break
            except:
                pass

    openLD = "OpenLD "

    AboutText += _("CPU:\t %s") % str(
        about.getCPUString()) + cpuMHz + " " + str(
            about.getCpuCoresString2()) + "\n"
    AboutText += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"

    imagestarted = ""
    bootname = ''
    if path.exists('/boot/bootname'):
        f = open('/boot/bootname', 'r')
        bootname = f.readline().split('=')[1]
        f.close()

    if path.exists('/boot/STARTUP'):
        f = open('/boot/STARTUP', 'r')
        f.seek(22)
        image = f.read(1)
        f.close()
        if bootname: bootname = "   (%s)" % bootname
        AboutText += _(
            "Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n"
    elif path.exists('/boot/cmdline.txt'):
        f = open('/boot/cmdline.txt', 'r')
        f.seek(38)
        image = f.read(1)
        f.close()
        if bootname: bootname = "   (%s)" % bootname
        AboutText += _(
            "Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n"

    AboutText += _("Architecture:\t %s") % str(about.getCPUArch()) + "\n"
    AboutText += _("BogoMIPS:\t %s") % bogoMIPS + "\n"
    AboutText += _("Firmware:\t %s") % openLD + str(getImageVersion()) + "\n"
    #AboutText += _("Build:\t %s") % getImageBuild() + "\n"
    #AboutText += _("Image Type:\t%s\n") % getImageType() + "\n"
    AboutText += _("CodeName:\t %s") % getImageCodeName() + "\n"
    AboutText += _("Kernel:\t %s") % str(about.getKernelVersionString()) + "\n"
    AboutText += _("DVB drivers:\t %s") % str(
        about.getDriverInstalledDate()) + "\n"
    AboutText += _("Last update:\t %s") % MyDateConverter(
        str(getEnigmaVersionString())) + "\n"
    AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n"
    AboutText += _("Uptime:\t %s") % str(about.getUptimeString()) + "\n"
    AboutText += _("GStreamer:\t %s") % str(
        about.getGStreamerVersionString().replace('GStreamer', '')) + "\n"
    if path.exists('/usr/bin/ffmpeg'):
        try:
            AboutText += _("FFmpeg:\t %s") % str(
                about.getFFmpegVersionString()) + "\n"
        except:
            pass
    AboutText += _("Python:\t %s") % str(
        about.getPythonVersionString()) + "\n\n"
    #AboutText += _("CPU Load:\t %s") % str(about.getLoadCPUString()) + "\n"

    #AboutText += _("Installed:\t ") + about.getFlashDateString() + "\n"
    #AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n\n"

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

    tempinfo = ""
    if path.exists('/proc/stb/sensors/temp0/value'):
        f = open('/proc/stb/sensors/temp0/value', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/proc/stb/fp/temp_sensor'):
        f = open('/proc/stb/fp/temp_sensor', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/proc/stb/sensors/temp/value'):
        f = open('/proc/stb/sensors/temp/value', 'r')
        tempinfo = f.read()
        f.close()
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("System temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"

    tempinfo = ""
    if path.exists('/proc/stb/fp/temp_sensor_avs'):
        f = open('/proc/stb/fp/temp_sensor_avs', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/proc/stb/power/avs'):
        try:
            f = open('/proc/stb/power/avs', 'r')
            temp = f.read()
            celsius = temp[0:-1]
            tempinfo = celsius
            f.close()
        except:
            tempinfo = ""
    elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
        try:
            f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
            temp = f.read()
            tempinfo = temp[:-4]
            f.close()
        except:
            tempinfo = ""
    if tempinfo and str(round(int(tempinfo.replace('\n', '')))) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"
    AboutLcdText = AboutText.replace('\t', ' ')

    return AboutText, AboutLcdText
Example #8
0
    def updateInfo(self):
        self.DynamicTimer.start(1000)
        rc = system("df -h > /tmp/syinfo.tmp")
        if config.osd.language.value == 'es_ES':
            self.text = "RECEPTOR\n"
        else:
            self.text = "BOX\n"
        f = open("/proc/stb/info/model", 'r')
        if config.osd.language.value == 'es_ES':
            self.text += "Modelo:\t" + about.getBoxType() + "\n"
        else:
            self.text += "Model:\t" + about.getBoxType() + "\n"
        f.close()
        #f = open("/proc/stb/info/chipset",'r')
        #self.text += "Chipset:\t" + about.getChipSetString() + "\n"
        #f.close()
        cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
        cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
        try:
            res = popen(cmd).read()
            res2 = popen(cmd2).read()
        except:
            res = ""
            res2 = ""
        cpuMHz = ""
        bogoMIPS = ""
        if res:
            cpuMHz = "   \t(" + res.replace("\n", "") + " MHz)"
        if res2:
            bogoMIPS = "" + res2.replace("\n", "")
        f = open('/proc/cpuinfo', 'r')
        self.text += "CPU: \t" + about.getCPUString() + cpuMHz + "\n"
        self.text += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
        self.text += "BogoMIPS \t" + bogoMIPS + "\n"
        f.close()
        if config.osd.language.value == 'es_ES':
            self.text += "\nMEMORIA\n"
        else:
            self.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"):
                memFree = parts[1].strip()
            elif key == "SwapTotal":
                swapTotal = parts[1].strip()
            elif key == "SwapFree":
                swapFree = parts[1].strip()
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Total:\t%s\n" % memTotal
        else:
            self.text += "Total memory:\t%s\n" % memTotal
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Libre:\t%s \n" % memFree
        else:
            self.text += "Free memory:\t%s \n" % memFree
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Usada:\t%s" % str(
                about.getRAMusageString()) + "\n"
        else:
            self.text += "Memory Usage:\t%s" % str(
                about.getRAMusageString()) + "\n"
        out_lines = file("/proc/meminfo").readlines()
        for lidx in range(len(out_lines) - 1):
            tstLine = out_lines[lidx].split()
            if "Buffers:" in tstLine:
                Buffers = out_lines[lidx].split()
                self.text += _("Buffers:") + "\t" + Buffers[1] + ' kB' "\n"
            if "Cached:" in tstLine:
                Cached = out_lines[lidx].split()
                self.text += _("Cached:") + "\t" + Cached[1] + ' kB' "\n"
        if config.osd.language.value == 'es_ES':
            self.text += "Swap total:\t%s \n" % swapTotal
        else:
            self.text += "Swap total:\t%s \n" % swapTotal
        if config.osd.language.value == 'es_ES':
            self.text += "Swap libre:\t%s \n" % swapFree
        else:
            self.text += "Swap free:\t%s \n" % swapFree
        if config.osd.language.value == 'es_ES':
            self.text += "\nALMACENAMIENTO\n"
        else:
            self.text += "\nSTORAGE\n"
        f = open("/tmp/syinfo.tmp", 'r')
        line = f.readline()
        parts = line.split()
        self.text += parts[0] + "\t" + parts[1].strip() + "      " + parts[
            2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
        line = f.readline()
        parts = line.split()
        self.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:
                    self.text += parts[5] + "\t" + parts[1].strip(
                    ) + "  " + parts[2].strip() + "  " + parts[3].strip(
                    ) + "  " + parts[4] + "\n"
        f.close()
        os_remove("/tmp/syinfo.tmp")

        self.text += "\nSOFTWARE\n"
        openLD = "OpenLD "
        self.text += "Firmware:\t %s" % openLD + str(
            about.getImageVersion()) + "\n"
        self.text += "Kernel: \t " + about.getKernelVersionString() + "\n"
        self.text += _("DVB drivers:\t %s") % str(
            about.getDriverInstalledDate()) + "\n"
        self.text += _("Last update:\t %s") % str(
            getEnigmaVersionString()) + "\n"
        self.text += _("GStreamer:\t%s") % str(
            about.getGStreamerVersionString().replace('GStreamer', '')) + "\n"
        #self.text += _("FFmpeg:\t%s") % str((' 3.1.4')) + "\n"
        self.text += _(
            "Python:\t %s") % about.getPythonVersionString() + "\n\n"

        self["lab1"].setText(self.text)
Example #9
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
			})
Example #10
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
            })
Example #11
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
			})
Example #12
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
            })
Example #13
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
            })
Example #14
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit = skin.parameters.get("AboutHddSplit", 0)

        bhVer = 'Black Hole'
        f = open('/etc/image-version', '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 = _('Black Hole ') + bhVer + '\n'
        AboutText += _('Support: REDOUANE [email protected]') + '\n\n'

        AboutText += _('Hardware: ') + about.getHardwareTypeString() + '\n'
        AboutText += _('CPU: ') + about.getCPUInfoString() + '\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"

        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
            })
Example #15
0
	def updateInfo(self):
		self.DynamicTimer.start(1000)
		rc = system("df -h > /tmp/syinfo.tmp")
		if config.osd.language.value == 'es_ES':
			self.text = "RECEPTOR\n"
		else:
			self.text = "BOX\n"
		f = open("/proc/stb/info/model",'r')
		if config.osd.language.value == 'es_ES':
			self.text += "Modelo:\t" + about.getBoxType() + "\n"
		else:
			self.text += "Model:\t" + about.getBoxType() + "\n"
		f.close()
		#f = open("/proc/stb/info/chipset",'r')
		#self.text += "Chipset:\t" + about.getChipSetString() + "\n"
		#f.close()
		cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
		cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
		try:
			res = popen(cmd).read()
			res2 = popen(cmd2).read()
		except:
			res = ""
			res2 = ""
		cpuMHz = ""
		bogoMIPS = ""
		if res:
			cpuMHz = "   \t(" + res.replace("\n", "") + " MHz)"
		if res2:
			bogoMIPS = "" + res2.replace("\n", "")
		f = open('/proc/cpuinfo', 'r')
		self.text += "CPU: \t" + about.getCPUString() + cpuMHz + "\n"
		self.text += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
		self.text += "BogoMIPS \t" + bogoMIPS + "\n"
		f.close()
		if config.osd.language.value == 'es_ES':
			self.text += "\nMEMORIA\n"
		else:
			self.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"):
				memFree = parts[1].strip()
			elif key == "SwapTotal":
				swapTotal = parts[1].strip()
			elif key == "SwapFree":
				swapFree = parts[1].strip()
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Total:\t%s\n" % memTotal
		else:
			self.text += "Total memory:\t%s\n" % memTotal
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Libre:\t%s \n" % memFree
		else:
			self.text += "Free memory:\t%s \n" % memFree
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Usada:\t%s" % str(about.getRAMusageString()) + "\n"
		else:
			self.text += "Memory Usage:\t%s" % str(about.getRAMusageString()) + "\n"
		out_lines = file("/proc/meminfo").readlines()
		for lidx in range(len(out_lines) - 1):
			tstLine = out_lines[lidx].split()
			if "Buffers:" in tstLine:
				Buffers = out_lines[lidx].split()
				self.text += _("Buffers:") + "\t" + Buffers[1] + ' kB'"\n"
			if "Cached:" in tstLine:
				Cached = out_lines[lidx].split()
				self.text += _("Cached:") + "\t" + Cached[1] + ' kB'"\n"
		if config.osd.language.value == 'es_ES':
			self.text += "Swap total:\t%s \n" % swapTotal
		else:
			self.text += "Swap total:\t%s \n" % swapTotal
		if config.osd.language.value == 'es_ES':
			self.text += "Swap libre:\t%s \n" % swapFree
		else:
			self.text += "Swap free:\t%s \n" % swapFree
		if config.osd.language.value == 'es_ES':
			self.text += "\nALMACENAMIENTO\n"
		else:
			self.text += "\nSTORAGE\n"
		f = open("/tmp/syinfo.tmp",'r')
		line = f.readline()
		parts = line.split()
		self.text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
		line = f.readline()
		parts = line.split()
		self.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:
					self.text += parts[5] + "\t" + parts[1].strip() + "  " + parts[2].strip() + "  " + parts[3].strip() + "  " + parts[4] + "\n"
		f.close()
		os_remove("/tmp/syinfo.tmp")

		self.text += "\nSOFTWARE\n"
		openLD = "OpenLD "
		self.text += "Firmware:\t %s" % openLD + str(about.getImageVersion()) + "\n"
		self.text += "Kernel: \t " + about.getKernelVersionString() + "\n"
		self.text += _("DVB drivers:\t %s") % str(about.getDriverInstalledDate()) + "\n"
		self.text += _("Last update:\t %s") % str(getEnigmaVersionString()) + "\n"
		self.text += _("GStreamer:\t%s") % str(about.getGStreamerVersionString().replace('GStreamer','')) + "\n"
		#self.text += _("FFmpeg:\t%s") % str((' 3.1.4')) + "\n"
		self.text += _("Python:\t %s") % about.getPythonVersionString() + "\n\n"

		self["lab1"].setText(self.text)
Example #16
0
File: About.py Project: vuteam/habi
    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 += _(
            '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'
        ImageVersion = _('Last upgrade: ') + about.getImageVersionString()
        self['ImageVersion'] = StaticText(ImageVersion)
        AboutText += ImageVersion + '\n'
        AboutText += _('DVB drivers: ') + about.getDriverInstalledDate() + '\n'
        AboutText += _(
            'Python version: ') + about.getPythonVersionString() + '\n'
        AboutText += _('Moderator: Redouane') + '\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)
        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_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
            })
Example #17
0
    def __init__(self, session):
        Screen.__init__(self, session)

        AboutText = _("Model:%s %s\n") % (getMachineBrand(), getMachineName())
        AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\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"

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

        AboutText += _("Moderator: Sodo ") + "\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_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
            })
Example #18
0
    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 == 'tomcat':
            BoxName = "XCORE Tomcat"
        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"

        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(
            ["SetupActions", "ColorActions", "DirectionActions"],
            {
                "cancel": self.close,
                "ok": self.close,
                #"red": self.showCommits,
                #"green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Example #19
0
def getAboutText():
	AboutText = ""

	AboutText += _("Model:\t %s %s\n") % (getMachineBrand(), getMachineName())

	if path.exists('/proc/stb/info/chipset'):
		AboutText += _("Chipset:\t %s") % str(about.getChipSetString()) + "\n"

	bogoMIPS = ""
	if path.exists('/proc/cpuinfo'):
		f = open('/proc/cpuinfo', 'r')
		temp = f.readlines()
		f.close()
		try:
			for lines in temp:
				lisp = lines.split(': ')
				if lisp[0].startswith('BogoMIPS'):
					bogoMIPS = "" + str(int(float(lisp[1].replace('\n','')))) + ""
					#bogoMIPS = "" + lisp[1].replace('\n','') + ""
					break
		except:
			pass

	cpuMHz = " - AMLogic AML-8726 MX  (1,5 GHz)"

	gpuMHZ = "Mali MP400 (Dual Core)"

	openLD = "OpenLD "

	AboutText += _("CPU:\t %s") % str(about.getCPUString()) + cpuMHz + "\n"
	AboutText += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
	AboutText += _("BogoMIPS:\t %s") % bogoMIPS + "\n"
	AboutText += _("GPU:\t %s") % gpuMHZ + "\n"
	AboutText += _("Firmware:\t %s") % openLD + str(about.getImageVersion()) + "\n"
	#AboutText += _("Build:\t %s") % getImageBuild() + "\n"
	AboutText += _("Kernel:\t %s") % str(about.getKernelVersionString()) + "\n"
	AboutText += _("DVB drivers:\t %s") % str(about.getDriverInstalledDate()) + "\n"
	AboutText += _("Last update:\t %s") % str(getEnigmaVersionString()) + "\n"
	AboutText += _("GStreamer:\t%s") % str(about.getGStreamerVersionString().replace('GStreamer','')) + "\n"
	AboutText += _("Python:\t %s") % about.getPythonVersionString() + "\n\n"
	#AboutText += _("CPU Load:\t %s") % str(about.getLoadCPUString()) + "\n"

	#AboutText += _("Installed:\t ") + about.getFlashDateString() + "\n"
	#AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n\n"

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

	tempinfo = ""
	if path.exists('/proc/stb/sensors/temp0/value'):
		f = open('/proc/stb/sensors/temp0/value', 'r')
		tempinfo = f.read()
		f.close()
	elif path.exists('/proc/stb/fp/temp_sensor'):
		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:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

	tempinfo = ""
	if path.exists('/proc/stb/fp/temp_sensor_avs'):
		f = open('/proc/stb/fp/temp_sensor_avs', 'r')
		tempinfo = f.read()
		f.close()
	if tempinfo and int(tempinfo.replace('\n', '')) > 0:
		mark = str('\xc2\xb0')
		AboutText += _("Processor temperature:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"
	AboutLcdText = AboutText.replace('\t', ' ')

	return AboutText, AboutLcdText
Example #20
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"

        if SystemInfo["HasH9SD"]:
            if "rootfstype=ext4" in open(
                    '/sys/firmware/devicetree/base/chosen/bootargs',
                    'r').read():
                part = "        - SD card in use for Image root \n"
            else:
                part = "        - eMMC slot in use for Image root \n"
            AboutText += _("%s") % part

        if SystemInfo["canMultiBoot"]:
            slot = image = GetCurrentImage()
            part = "eMMC slot %s" % slot
            bootmode = ""
            if SystemInfo["canMode12"]:
                bootmode = " bootmode = %s" % GetCurrentImageMode()
            AboutText += _("STARTUP slot: ") + str(
                GetCurrentImage()) + bootmode + "\n"
            if SystemInfo["HasHiSi"]:
                slot += 1
                if image != 0:
                    part = "SDC slot %s (%s%s) " % (
                        image, SystemInfo["canMultiBoot"][2], image * 2)
                else:
                    part = "eMMC slot %s" % slot
            AboutText += _("Image Slot:\t%s") % "STARTUP_" + str(
                slot) + "  " + part + " " + bootmode + "\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)

        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
            })
Example #21
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("About"))
		hddsplit, = skin.parameters.get("AboutHddSplit", (0,))

		hwname = ""
		if about.getHardwareTypeString() == "ini-8000sv":
		    hwname = "MB Premium Ultra HD"
		    AboutText = _("Hardware: ") + hwname + "\n"
		elif about.getHardwareTypeString() == "ini-5000sv":
		    hwname = "MB Premium Twin HD"
		    AboutText = _("Hardware: ") + hwname + "\n"
		elif about.getHardwareTypeString() == "ini-2000sv":
		    hwname = "MB Premium Mini+ PLUS  HD"
		    AboutText = _("Hardware: ") + hwname + "\n"
		elif about.getHardwareTypeString() == "ini-1000sv":
		    hwname = "MB Premium Mini HD"
		    AboutText = _("Hardware: ") + hwname + "\n"
		elif about.getHardwareTypeString().startswith("7000"):
		    hwname = "MB Premium Micro"
		    AboutText = _("Hardware: ") + hwname + "\n"
		elif about.getHardwareTypeString().startswith("g300"):
		    hwname = "MB Premium Twin+"
		    AboutText = _("Hardware: ") + hwname + "\n"
		else:
		    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"

		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.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
			})
Example #22
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 += _("Info: www.nonsolosat.net") + "\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().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)

		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
			})
Example #23
0
	def __init__(self, session):
		Screen.__init__(self, session)


		AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
		AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
		AboutText += _("Image: ") + about.getImageTypeString() + "\n"
		AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\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"

		AboutText += _("DVB drivers: ") + about.getDriverInstalledDate() + "\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["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
			})
Example #24
0
    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 == 'vusolo2':
            BoxName = "VuSolo2 Sodo Build"
        elif boxtype == 'vuzero':
            BoxName = "VuZero Sodo Build"
        elif boxtype == 'vuuno':
            BoxName = "vuuno Sodo Build"
        elif boxtype == 'vuultimo':
            BoxName = "vuultimo Sodo Build"
        elif boxtype == 'vusolo':
            BoxName = "vusolo Sodo Build"
        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() == 'vusolo2':
            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: ") + about.getDriverInstalledDate() + "\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"

        PythonVersion = _(
            "Python version: ") + about.getPythonVersionString() + "\n"
        self["PythonVersion"] = StaticText(PythonVersion)
        AboutText += PythonVersion + "\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
            })
Example #25
0
File: About.py Project: 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
			})
Example #26
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('About'))
        hddsplit = skin.parameters.get('AboutHddSplit', 0)

        bhVer = 'Black Hole'
        f = open('/etc/imageversion', '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: RAED [email protected]')
        self['CpuInfo'] = StaticText(_('CPU: ') + self.getCPUInfoString())
        
        AboutText = _('Black Hole ') + bhVer + '\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

        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})
Example #27
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})
Example #28
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
            })
Example #29
0
	def updateInfo(self):
		#self.DynamicTimer.start(6000)
		rc = system("df -h > /tmp/syinfo.tmp")
		self.text = _("BOX\n")
		f = open("/proc/stb/info/model",'r')
		self.text += _("Model:\t%s") % str(getMachineBrand()) + " " + str(getMachineName()) + "\n"
		f.close()
		#f = open("/proc/stb/info/chipset",'r')
		#self.text += "Chipset:\t" + about.getChipSetString() + "\n"
		#f.close()
		cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
		cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
		try:
			res = popen(cmd).read()
			res2 = popen(cmd2).read()
		except:
			res = ""
			res2 = ""
		cpuMHz = ""
		bogoMIPS = ""
		if getMachineBuild() in ('vusolo4k','vuultimo4k','vuzero4k'):
			cpuMHz = "  \t(1,5 GHz)"
		elif getMachineBuild() in ('formuler1tc','formuler1','triplex','tiviaraplus'):
			cpuMHz = "  \t(1,3 GHz)"
		elif getMachineBuild() in ('u51','u5','u53','u52','u5pvr','h9'):
			cpuMHz = "  \t(1,6 GHz)"
		elif getMachineBuild() in ('vuuno4kse','vuuno4k','gbquad4k','dm900','dm920','gb7252','dags7252','xc7439','8100s'):
			cpuMHz = "  \t(1,7 GHz)"
		elif getMachineBuild() in ('alien5'):
			cpuMHz = "  \t(2,0 GHz)"
		elif getMachineBuild() in ('sf5008','et13000','et1x000','hd52','hd51','sf4008','vs1500','h7'):
			try:
				import binascii
				f = open('/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb')
				clockfrequency = f.read()
				f.close()
				cpuMHz = "  \t(%s MHz)" % str(round(int(binascii.hexlify(clockfrequency), 16)/1000000,1))
			except:
				cpuMHz = "  \t(1,7 GHz)"
		elif res:
			cpuMHz = "  \t(" + res.replace("\n", "") + " MHz)"
		if res2:
			bogoMIPS = "" + res2.replace("\n", "")
		f = open('/proc/cpuinfo', 'r')
		self.text += "CPU: \t" + str(about.getCPUString()) + cpuMHz + "  " + str(about.getCpuCoresString2()) + "\n"
		self.text += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
		self.text += _("Architecture:\t %s") % str(about.getCPUArch()) + "\n"
		#self.text += _("CPU Load:\t %s") % str(about.getLoadCPUString()) + "\n"
		self.text += "BogoMIPS: \t" + bogoMIPS + "\n"
		f.close()
		#self.text += _("\nMEMORY\n")
		#self.text += _("Total:\t%s") % str(about.getRAMTotalString()) + " MB\n"
		#self.text += _("Free:\t%s ") % str(about.getRAMFreeString()) + " MB  (" + str(about.getRAMFreePorcString()) + ")\n"
		#self.text += _("Usage:\t%s") % str(about.getRAMUsedString()) + " MB  (" + str(about.getRAMusageString()) + ")\n"
		#self.text += _("Shared:\t%s") % str(about.getRAMSharingString()) + " MB" +  "\n"
		#self.text += _("Stored:\t%s") % str(about.getRAMStoredString()) + " MB" +  "\n"
		#self.text += _("Cached:\t%s") % str(about.getRAMCachedString()) + " MB" +  "\n"
		#out_lines = file("/proc/meminfo").readlines()
		#for lidx in range(len(out_lines) - 1):
		#	tstLine = out_lines[lidx].split()
		#	if "Buffers:" in tstLine:
		#		Buffers = out_lines[lidx].split()
		#		self.text += _("Buffers:") + "\t" + Buffers[1] + ' kB'"\n"
		#	if "Cached:" in tstLine:
		#		Cached = out_lines[lidx].split()
		#		self.text += _("Cached:") + "\t" + Cached[1] + ' kB'"\n"
		#self.text += _("Swap total:\t%s") % str(about.getRAMSwapTotalString()) + " MB\n"
		#self.text += _("Swap free:\t%s") % str(about.getRAMSwapFreeString()) + " MB\n"
		#self.text += _("\nSTORAGE\n")
		#if os.path.exists('/tmp/syinfo.tmp'):
		#	try:
		#		f = open("/tmp/syinfo.tmp",'r')
		#		line = f.readline()
		#		parts = line.split()
		#		self.text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
		#		line = f.readline()
		#		parts = line.split()
		#		self.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:
		#					self.text += parts[5] + "\t" + parts[1].strip() + "  " + parts[2].strip() + "  " + parts[3].strip() + "  " + parts[4] + "\n"
		#		f.close()
		#		os_remove("/tmp/syinfo.tmp")
		#	except:
		#		return

		self.text += "\nSOFTWARE\n"
		openLD = "OpenLD "
		self.text += "Firmware:\t %s" % openLD + str(about.getImageVersion()) + "\n"
		self.text += _("CodeName:\t %s") % str(getImageCodeName()) + "\n"
		self.text += "Kernel: \t " + about.getKernelVersionString() + "\n"
		self.text += _("DVB drivers:\t %s") % MyDateConverter(str(about.getDriverInstalledDate())) + "\n"
		self.text += _("Last update:\t %s") % MyDateConverter(str(getEnigmaVersionString())) + "\n"
		self.text += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n"
		self.text += _("Uptime:\t %s") % str(about.getUptimeString()) + "\n"
		self.text += _("GStreamer:\t %s") % str(about.getGStreamerVersionString().replace('GStreamer','')) + "\n"
		if path.exists('/usr/bin/ffmpeg'):
			try:
				self.text += _("FFmpeg:\t %s") % str(about.getFFmpegVersionString()) + "\n"
			except:
				pass
		self.text += _("Python:\t %s") % about.getPythonVersionString() + "\n\n"

		self["lab1"].setText(self.text)
Example #30
0
def getAboutText():
    AboutText = ""

    AboutText += _("Model:\t %s %s\n") % (getMachineBrand(), getMachineName())

    if path.exists('/proc/stb/info/chipset'):
        AboutText += _("Chipset:\t %s") % str(about.getChipSetString()) + "\n"

    bogoMIPS = ""
    if path.exists('/proc/cpuinfo'):
        f = open('/proc/cpuinfo', 'r')
        temp = f.readlines()
        f.close()
        try:
            for lines in temp:
                lisp = lines.split(': ')
                if lisp[0].startswith('BogoMIPS'):
                    bogoMIPS = "" + str(int(float(lisp[1].replace('\n',
                                                                  '')))) + ""
                    #bogoMIPS = "" + lisp[1].replace('\n','') + ""
                    break
        except:
            pass

    cpuMHz = " - AMLogic AML-8726 MX  (1,5 GHz)"

    gpuMHZ = "Mali MP400 (Dual Core)"

    openLD = "OpenLD "

    AboutText += _("CPU:\t %s") % str(about.getCPUString()) + cpuMHz + "\n"
    AboutText += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
    AboutText += _("BogoMIPS:\t %s") % bogoMIPS + "\n"
    AboutText += _("GPU:\t %s") % gpuMHZ + "\n"
    AboutText += _("Firmware:\t %s") % openLD + str(
        about.getImageVersion()) + "\n"
    #AboutText += _("Build:\t %s") % getImageBuild() + "\n"
    AboutText += _("Kernel:\t %s") % str(about.getKernelVersionString()) + "\n"
    AboutText += _("DVB drivers:\t %s") % str(
        about.getDriverInstalledDate()) + "\n"
    AboutText += _("Last update:\t %s") % str(getEnigmaVersionString()) + "\n"
    AboutText += _("GStreamer:\t%s") % str(
        about.getGStreamerVersionString().replace('GStreamer', '')) + "\n"
    AboutText += _("Python:\t %s") % about.getPythonVersionString() + "\n\n"
    #AboutText += _("CPU Load:\t %s") % str(about.getLoadCPUString()) + "\n"

    #AboutText += _("Installed:\t ") + about.getFlashDateString() + "\n"
    #AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n\n"

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

    tempinfo = ""
    if path.exists('/proc/stb/sensors/temp0/value'):
        f = open('/proc/stb/sensors/temp0/value', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/proc/stb/fp/temp_sensor'):
        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:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"

    tempinfo = ""
    if path.exists('/proc/stb/fp/temp_sensor_avs'):
        f = open('/proc/stb/fp/temp_sensor_avs', 'r')
        tempinfo = f.read()
        f.close()
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"
    AboutLcdText = AboutText.replace('\t', ' ')

    return AboutText, AboutLcdText