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 })
import os import re from socket import * from Components.Console import Console from Components.PluginComponent import plugins from Plugins.Plugin import PluginDescriptor from Components.About import about oeversion = about.getVisionVersion() class Network: def __init__(self): self.ifaces = {} self.configuredNetworkAdapters = [] self.NetworkState = 0 self.DnsState = 0 self.nameservers = [] self.ethtool_bin = "/usr/sbin/ethtool" self.console = Console() self.linkConsole = Console() self.restartConsole = Console() self.deactivateInterfaceConsole = Console() self.activateInterfaceConsole = Console() self.resetNetworkConsole = Console() self.dnsConsole = Console() self.pingConsole = Console() self.config_ready = None self.friendlyNames = {} self.lan_interfaces = [] self.wlan_interfaces = [] self.remoteRootFS = None
def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("About")) hddsplit = skin.parameters.get("AboutHddSplit", 0) AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\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" AboutText += _("Flash type: ") + about.getFlashType() + "\n" AboutText += _("Image: ") + about.getImageTypeString() + "\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 upgrade: ") + 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 })