def __init__(self, session, request): WebScreen.__init__(self, session, request) from WebComponents.Sources.About import About from WebComponents.Sources.Frontend import Frontend from WebComponents.Sources.Hdd import Hdd from WebComponents.Sources.Network import Network from Components.config import config from Components.About import about from Components.Sources.StaticText import StaticText try: from Tools.StbHardware import getFPVersion except: from Tools.DreamboxHardware import getFPVersion from Tools.HardwareInfo import HardwareInfo hw = HardwareInfo() self["About"] = About(session) self["Network"] = Network() self["Hdd"] = Hdd() self["Frontends"] = Frontend() try: from enigma import getEnigmaVersionString from boxbranding import getImageVersion, getImageBuild self["EnigmaVersion"] = StaticText(getEnigmaVersionString()) self["ImageVersion"] = StaticText(getImageVersion() + '.' + getImageBuild()) except: self["EnigmaVersion"] = StaticText(about.getEnigmaVersionString()) self["ImageVersion"] = StaticText(about.getVersionString()) self["WebIfVersion"] = StaticText( config.plugins.Webinterface.version.value) self["FpVersion"] = StaticText(str(getFPVersion())) self["DeviceName"] = StaticText(hw.get_device_name())
def Plugins(**kwargs): from Tools.StbHardware import getFPVersion from Screens.MessageBox import MessageBox version = getFPVersion() newversion = getUpgradeVersion() or 0 list = [] if version is not None and version < newversion: list.append( PluginDescriptor(name=_("FP Upgrade"), where=PluginDescriptor.WHERE_WIZARD, needsRestart=True, fnc=(8, FPUpgrade))) try: msg = open("/proc/stb/message").read() list.append( PluginDescriptor(name=_("System Message Check"), where=PluginDescriptor.WHERE_WIZARD, needsRestart=True, fnc=(9, SystemMessage, msg))) except: pass return list
def __init__(self, session, request): WebScreen.__init__(self, session, request) from WebComponents.Sources.About import About from WebComponents.Sources.Frontend import Frontend from WebComponents.Sources.Hdd import Hdd from WebComponents.Sources.Network import Network from Components.config import config from Components.About import about from Components.Sources.StaticText import StaticText try: from Tools.StbHardware import getFPVersion except: from Tools.DreamboxHardware import getFPVersion from Tools.HardwareInfo import HardwareInfo hw = HardwareInfo() self["About"] = About(session) self["Network"] = Network() self["Hdd"] = Hdd() self["Frontends"] = Frontend() try: from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString self["EnigmaVersion"] = StaticText(getEnigmaVersionString()) self["ImageVersion"] = StaticText(getVersionString() + '.' + getBuildVersionString()) except: self["EnigmaVersion"] = StaticText(about.getEnigmaVersionString()) self["ImageVersion"] = StaticText(about.getVersionString()) self["WebIfVersion"] = StaticText(config.plugins.Webinterface.version.value) self["FpVersion"] = StaticText(str(getFPVersion())) self["DeviceName"] = StaticText(hw.get_device_name())
def populate(self): self["lab1"] = StaticText(_("openATV")) self["lab2"] = StaticText(_("By openATV Image Team")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.opena.tv") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n" AboutText += _("CPU:\t%s") % about.getCPUString() + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("Version:\t%s") % getImageVersion() + "\n" AboutText += _("Build:\t%s") % getImageBuild() + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\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', '') + 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', '') + mark + "C\n" self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString() AboutText += _("CPU:\t%s\n") % about.getCPUString() AboutText += _("CPU Speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores:\t%s\n") % about.getCpuCoresString() AboutText += _("Version:\t%s\n") % getImageVersion() AboutText += _("Build:\t%s\n") % getImageBuild() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer", "") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n\n") % getEnigmaVersionString() fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value') and getBoxType( ) not in ('gbquad'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ( 'gbquad'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature: %s%sC\n\n") % ( tempinfo.replace('\n', ''), mark) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("openATV")) self["lab2"] = StaticText(_("By openATV Image Team")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.opena.tv") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists("/proc/stb/info/chipset"): AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n" AboutText += _("CPU:\t%s") % about.getCPUString() + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("Version:\t%s") % getImageVersion() + "\n" AboutText += _("Build:\t%s") % getImageBuild() + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = "-".join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\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", "") + 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", "") + mark + "C\n" self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString() AboutText += _("CPU:\t%s\n") % about.getCPUString() AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores:\t%s\n") % about.getCpuCoresString() imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Build:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title()) AboutText += _("Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9] string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n\n") % getEnigmaVersionString() fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in ('gbquad'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ('gbquad'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature: %s%sC\n\n") % (tempinfo.replace('\n', ''), mark) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com") if getMachineBrand() == 'Vu+': self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.com") elif getMachineBrand() == 'Xtrend': self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.com") elif getMachineBrand() == 'Odin': self["lab3"] = StaticText(_("Support at") + " www.odin-support.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s") % about.getChipSetString() + "\n" AboutText += _("CPU:\t%s") % about.getCPUString() + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("Version:\t%s") % getImageVersion() + "\n" AboutText += _("Build:\t%s") % getImageBuild() + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in ('gbquad'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ('gbquad'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature: %s") % tempinfo.replace('\n', '') + mark + "C\n\n" self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("ViX4E2PROJECT")) self["lab2"] = StaticText(_("By ViX4 Antony")) model = None AboutText = "" self["lab3"] = StaticText(_("www.ViX4.com")) AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t%s\n") % about.getChipSetString() AboutText += _("CPU:\t%s\n") % about.getCPUString() AboutText += _("CPU Speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores/Threads:\t%s\n") % about.getCpuCoresString() AboutText += _("Version:\t%s\n") % getImageVersion() AboutText += _("Build:\t%s\n") % getImageBuild() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Last update:\t%s\n\n") % getEnigmaVersionString() fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in ('gbquad'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ('gbquad'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature: %s%sC\n\n") % (tempinfo.replace('\n', ''), mark) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): EGAMIVersion = _('EGAMI %s') % about.getImageVersionString() self['lab1'] = Label(EGAMIVersion) model = None AboutText = '' AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _('Chipset:\tBCM%s\n') % about.getChipSetString() AboutText += _('CPU:\t%s\n') % about.getCPUString() AboutText += _('CPU speed:\t%s\n') % about.getCPUSpeedString() AboutText += _('Cores:\t%s\n') % about.getCpuCoresString() AboutText += _('Version:\t%s') % EGAMIVersion + '\n' AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n' AboutText += _('Oe-Core:\t%s') % about.getEnigmaVersionString() + '\n' AboutText += _( 'Skin name:\t%s\n') % config.skin.primary_skin.value[0:-9] string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _('Drivers:\t%s') % driversdate + '\n' fp_version = getFPVersion() if fp_version is None: fp_version = '' elif fp_version != 0: fp_version = _('Front panel:\t%s') % str(fp_version) AboutText += fp_version + '\n' AboutText += _('Python:\t%s\n') % about.getPythonVersionString() AboutText += _('GStreamer:\t%s') % about.getGStreamerVersionString( ).replace('GStreamer', '') + '\n' AboutText += _('MoDerator:\tRedouane\n') + '\n' tempinfo = '' if path.exists('/proc/stb/sensors/temp0/value') and getBoxType( ) not in 'gbquad': f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists( '/proc/stb/fp/temp_sensor') and getBoxType() not in 'gbquad': f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _('System temperature: %s') % tempinfo.replace( '\n', '') + mark + 'C\n\n' AboutText += _('Installed:\t%s\n') % about.getFlashDateString() AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\n\n' AboutText += _('WWW:\t%s') % about.getImageUrlString() self['AboutScrollLabel'] = ScrollLabel(AboutText)
def __init__(self, session): Screen.__init__(self, session) self.skin_path = resolveFilename(SCOPE_PLUGINS, "Extensions/MICOMUpgrade") self.session = session self["shortcuts"] = ActionMap( ["ShortcutActions", "SetupActions"], { "ok": self.keyGreen, "cancel": self.keyRed, "red": self.keyRed, "green": self.keyGreen, }, -2) self.list = [] self.updateFilePath = "" self.finishedExit = False self.rebootLock = False self.rebootMessage = "" self.cbRebootCallCount = 0 from Tools.StbHardware import getFPVersion self.version = str(getFPVersion() or "N/A") newversion = str("N/A") self["oldversion_label"] = Label(_("Current version:")) self["newversion_label"] = Label(_("New version:")) self["oldversion"] = Label(self.version) self["newversion"] = Label(newversion) self["key_red"] = StaticText(_("Close")) self.logmode = None self.old_blue_clicked = 0 self.fileopenmode = False self.upgrade_auto_run_timer = eTimer() self.upgrade_auto_run_timer.callback.append(self.keyGreen) global fwlist if fwlist is None: self["key_green"] = StaticText(" ") self["status"] = StaticText( _("This plugin is supported only the INI-Series.")) else: self["key_green"] = StaticText(_("Upgrade")) self["status"] = StaticText(" ") self.setupUI()
def populate(self): self["lab1"] = StaticText(_("openSWF")) self["lab2"] = StaticText(_("Mod Sodo")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.star7arab.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower().replace('\n','').replace('bcm','') + "\n" AboutText += _("CPU:\t%s") % about.getCPUString() + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("Version:\t%s") % getImageVersionString() + "\n" AboutText += _("Build:\t%s") % getBuildVersionString() + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" AboutText += _("OpenGL : BroadCom 2.0") + "\n" string = getDriverDateString() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: 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() if tempinfo and int(tempinfo.replace('\n','')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature: %s") % tempinfo.replace('\n','') + mark + "C\n\n" self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): EGAMIVersion = _('EGAMI %s') % about.getImageVersionString() self['lab1'] = Label(EGAMIVersion) model = None AboutText = '' AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _('Chipset:\tBCM%s\n') % about.getChipSetString() AboutText += _('CPU:\t%s\n') % about.getCPUString() AboutText += _('CPU speed:\t%s\n') % about.getCPUSpeedString() AboutText += _('Cores:\t%s\n') % about.getCpuCoresString() AboutText += _('Version:\t%s') % EGAMIVersion + '\n' AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n' AboutText += _('Oe-Core:\tOe-Alliance 3.4') + '\n' AboutText += _('Moderator:\tRedouane') + '\n' AboutText += _('Image Type:\t%s\n') % getImageType().title() AboutText += _('Skin name:\t%s\n') % config.skin.primary_skin.value[0:-9] string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _('Drivers:\t%s') % driversdate + '\n' fp_version = getFPVersion() if fp_version is None: fp_version = '' elif fp_version != 0: fp_version = _('Front panel:\t%s') % str(fp_version) AboutText += fp_version + '\n' AboutText += _('Python:\t%s\n') % about.getPythonVersionString() AboutText += _('GStreamer:\t%s') % about.getGStreamerVersionString().replace('GStreamer', '') + '\n\n' tempinfo = '' if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in 'gbquad': f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in 'gbquad': f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _('System temperature: %s') % tempinfo.replace('\n', '') + mark + 'C\n\n' AboutText += _('Installed:\t%s\n') % about.getFlashDateString() AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\n\n' AboutText += _('WWW:\t%s') % about.getImageUrlString() self['AboutScrollLabel'] = ScrollLabel(AboutText) return
def Plugins(**kwargs): from Tools.StbHardware import getFPVersion version = getFPVersion() newversion = getUpgradeVersion() or 0 list = [] if version is not None and version < newversion: list.append(PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(8, FPUpgrade))) try: msg = open("/proc/stb/message").read() list.append(PluginDescriptor(name="System Message Check", where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(9, SystemMessage, msg))) except: pass return list
def __init__(self, session): Screen.__init__(self, session) self.session = session self["shortcuts"] = ActionMap(["ShortcutActions", "SetupActions" ], { "ok": self.keyGreen, "cancel": self.keyRed, "red": self.keyRed, "green": self.keyGreen, }, -2) self.list = [] self.updateFilePath = "" self.finishedExit = False self.rebootLock = False self.rebootMessage = "" self.cbRebootCallCount = 0; from Tools.StbHardware import getFPVersion self.version = str(getFPVersion() or "N/A") newversion = str("N/A") self["oldversion_label"] = Label(_("Current version:")) self["newversion_label"] = Label(_("New version:")) self["oldversion"] = Label(self.version) self["newversion"] = Label(newversion) self["key_red"] = StaticText(_("Close")) self.logmode = None self.old_blue_clicked = 0 self.fileopenmode = False self.upgrade_auto_run_timer = eTimer() self.upgrade_auto_run_timer.callback.append(self.keyGreen) global fwlist if fwlist is None: self["key_green"] = StaticText(" ") self["status"] = StaticText(_("This plugin is supported only the INI-Series.")) else: self["key_green"] = StaticText(_("Upgrade")) self["status"] = StaticText(" ") self.setupUI()
def populate(self, bootLoaderInfo): self.list = [] self.list.append(self.makeHeadingInfoEntry(_("Model:"), "%s %s" % (getMachineBrand(), getMachineName()))) self.list.append(self.makeEmptyEntry()) if path.exists('/proc/stb/info/chipset'): self.list.append(self.makeInfoEntry(_("Chipset:"), "BCM%s" % about.getChipSetString())) self.list.append(self.makeInfoEntry(_("CPU:"), about.getCPUString())) self.list.append(self.makeInfoEntry(_("CPU Speed:"), about.getCPUSpeedString())) self.list.append(self.makeInfoEntry(_("Cores:"), str(about.getCpuCoresString()))) string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) self.list.append(self.makeInfoEntry(_("Drivers:"), driversdate)) self.list.append(self.makeInfoEntry(_("Image:"), about.getImageVersionString())) self.list.append(self.makeInfoEntry(_("Kernel:"), about.getKernelVersionString())) self.list.append(self.makeInfoEntry(_("Oe-Core:"), about.getEnigmaVersionString())) self.list.append(self.makeInfoEntry(_("Bootloader:"), bootLoaderInfo)) fp_version = getFPVersion() if fp_version is not None: self.list.append(self.makeInfoEntry(_("Front Panel:"), "%d" % fp_version)) self.list.append(self.makeEmptyEntry()) self.list.append(self.makeInfoEntry(_("Last Upgrade:"), about.getLastUpdateString())) self.list.append(self.makeEmptyEntry()) self.list.append(self.makeInfoEntry(_("WWW:"), about.getImageUrlString())) tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): tempinfo = file('/proc/stb/sensors/temp0/value').read() elif path.exists('/proc/stb/fp/temp_sensor'): tempinfo = file('/proc/stb/fp/temp_sensor').read() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') self.list.append(self.makeInfoEntry(_("System temperature:"), tempinfo.replace('\n', '') + mark + "C")) self.list.append(self.makeInfoEntry(_("GStreamer:"), about.getGStreamerVersionString().replace("GStreamer", "").strip())) self.list.append(self.makeInfoEntry(_("Python:"), about.getPythonVersionString())) self["list"].updateList(self.list)
def populate(self): EGAMIVersion = _("EGAMI %s") % about.getImageVersionString() self["lab1"] = Label(EGAMIVersion) model = None AboutText = "" AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists("/proc/stb/info/chipset"): AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString() AboutText += _("CPU:\t%s\n") % about.getCPUString() AboutText += _("CPU Speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores:\t%s\n") % about.getCpuCoresString() AboutText += _("Version:\t%s") % EGAMIVersion + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" AboutText += _("Oe-Core:\t%s") % about.getEnigmaVersionString() + "\n" AboutText += _("Image Type:\t%s\n") % getImageType().title() AboutText += _("Image Coder:\tSODO\n") string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = "-".join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Front panel:\t%s") % str(fp_version) AboutText += fp_version + "\n" AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString().replace("GStreamer", "") + "\n\n" tempinfo = "" if path.exists("/proc/stb/sensors/temp0/value") and getBoxType() not in "gbquad": f = open("/proc/stb/sensors/temp0/value", "r") tempinfo = f.read() f.close() elif path.exists("/proc/stb/fp/temp_sensor") and getBoxType() not in "gbquad": f = open("/proc/stb/fp/temp_sensor", "r") tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace("\n", "")) > 0: mark = str("\xc2\xb0") AboutText += _("System temperature: %s") % tempinfo.replace("\n", "") + mark + "C\n\n" AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n" AboutText += _("WWW:\t%s") % about.getImageUrlString() self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self['lab1'] = StaticText( _('Version:\t%s') % getImageVersion() + _(' %s') % getImageBuild()) self['lab2'] = StaticText(_('By REDOUANE')) model = None AboutText = '' self['lab3'] = StaticText(_('Support at') + ' www.pkteam.pl') AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _('Chipset:\tBCM%s') % about.getChipSetString() + '\n' AboutText += _('CPU:\t%s') % about.getCPUString() + '\n' AboutText += _('Cores:\t%s') % about.getCpuCoresString() + '\n' AboutText += _('Version:\t%s') % getImageVersion() + '\n' AboutText += _('Build:\t%s') % getImageBuild() + '\n' AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n' AboutText += _('OPENGL:\tGLS BroadCom V2.0') + '\n' string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _('Drivers:\t%s') % driversdate + '\n' AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\n\n' fp_version = getFPVersion() if fp_version is None: fp_version = '' elif fp_version != 0: 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() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _('System temperature: %s') % tempinfo.replace( '\n', '') + mark + 'C\n\n' self['AboutScrollLabel'] = ScrollLabel(AboutText)
def __init__(self, session): self.skin = FPUpgrade.skin Screen.__init__(self, session) from Tools.StbHardware import getFPVersion version = str(getFPVersion() or "N/A") newversion = str(getUpgradeVersion() or "N/A") self["text"] = Label(_("Your frontprocessor firmware must be upgraded.\nPress OK to start upgrade.")) self["oldversion_label"] = Label(_("Current version:")) self["newversion_label"] = Label(_("New version:")) self["oldversion"] = Label(version) self["newversion"] = Label(newversion) self["actions"] = ActionMap(["OkCancelActions"], { "ok": self.ok, "cancel": self.close, })
def populate(self): self['lab1'] = StaticText(_('Version:\t%s') % getImageVersion() + _(' %s') % getImageBuild()) self['lab2'] = StaticText(_('By REDOUANE')) model = None AboutText = '' self['lab3'] = StaticText(_('Support at') + ' www.pkteam.pl') AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _('Chipset:\tBCM%s') % about.getChipSetString() + '\n' AboutText += _('CPU:\t%s') % about.getCPUString() + '\n' AboutText += _('Cores:\t%s') % about.getCpuCoresString() + '\n' AboutText += _('Version:\t%s') % getImageVersion() + '\n' AboutText += _('Build:\t%s') % getImageBuild() + '\n' AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n' AboutText += _('OPENGL:\tGLS BroadCom V2.0') + '\n' string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _('Drivers:\t%s') % driversdate + '\n' AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\n\n' fp_version = getFPVersion() if fp_version is None: fp_version = '' elif fp_version != 0: 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() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _('System temperature: %s') % tempinfo.replace('\n', '') + mark + 'C\n\n' self['AboutScrollLabel'] = ScrollLabel(AboutText)
def getInfo(): # TODO: get webif versione somewhere! info = {} brand = "Dream Multimedia" model = "unknown" chipset = "unknown" if fileExists("/proc/stb/info/hwmodel"): file = open("/proc/stb/info/hwmodel") model = file.read().strip().lower() file.close() if model == "tmtwinoe": model = "TM-TWIN-OE" brand = "Technomate" elif model == "tm2toe": model = "TM-2T-OE" brand = "Technomate" elif model == "tmsingle": model = "TM-SINGLE" brand = "Technomate" elif model == "tmnanooe": model = "TM-NANO-OE" brand = "Technomate" elif model == "ios100hd": model = "IOS-100HD" brand = "Iqon" elif model == "ios200hd": model = "IOS-200HD" brand = "Iqon" elif model == "ios300hd": model = "IOS-300HD" brand = "Iqon" elif model == "optimussos1": model = "Optimuss-OS1" brand = "Edision" elif model == "optimussos2": model = "Optimuss-OS2" brand = "Edision" elif model == "sogno-8800hd": brand = "Sogno" model = "Sogno 8800HD" elif fileExists("/proc/stb/info/boxtype"): file = open("/proc/stb/info/boxtype") model = file.read().strip().lower() file.close() if model == "gigablue": brand = "GigaBlue" if fileExists("/proc/stb/info/gbmodel"): file = open("/proc/stb/info/gbmodel") model = file.read().strip().lower() file.close() elif model.startswith("et"): brand = "Clarke-Xtrend" if model == "et9500": model = "et9x00" elif model.startswith("ini"): if model.endswith("sv"): brand = "MiracleBox" if model == "ini-5000sv": model = "Premium Twin" elif model == "ini-1000sv": model = "Premium Mini" else: model elif model.endswith("de"): brand = "Golden Interstar" if model == "ini-1000de": model = "Xpeed LX" elif model == "ini-9000de": model = "Xpeed LX3" else: model elif model.endswith("ru"): brand = "Sezam" if model == "ini-1000ru": model = "Sezam 1000-HD" elif model == "ini-5000ru": model = "Sezam 5000-HD" elif model == "ini-9000ru": model = "Sezam Marvel" else: model else: brand = "Venton" elif model == "enfinity": brand = "EVO" model = "ENfinity" elif model == "xp1000": brand = "XP-Series" elif model == "xp1000s": brand = "Octagon" model = "SF8 HD" elif model == "odinm9": brand = "Odin-Series" elif model == "odinm7": if getImageDistro() == 'axassupport': brand = "AXAS" model = "Class M" elif getBoxType() == 'odinm6': brand = "TELESTAR" model = "STARSAT LX" elif getMachineName() == 'AX-Odin': brand = "Opticum" model = "AX-Odin" else: brand = "Odin-Series" elif model == "e3hd": if getImageDistro() == 'axassupport': brand = "AXAS" model = "Class E" else: brand = "E3-Series" elif model == "ebox5000": brand = "MixOs-Series" model = "MixOs F5" elif model == "ebox5100": brand = "MixOs-Series" model = "MixOs F5mini" elif model == "ebox7358": brand = "MixOs-Series" model = "MixOs F7" elif model.startswith("ixuss"): brand = "Ixuss-Series" chipset = "BCM7405" elif fileExists("/proc/stb/info/azmodel"): brand = "AZBOX" file = open("/proc/stb/info/model") model = file.read().strip().lower() file.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif fileExists("/proc/stb/info/vumodel"): brand = "Vu Plus" file = open("/proc/stb/info/vumodel") model = file.read().strip().lower() file.close() else: file = open("/proc/stb/info/model") model = file.read().strip().lower() if model.startswith('spar'): brand = "Spark" file.close() info['brand'] = brand info['model'] = model if fileExists("/proc/stb/info/chipset"): f = open("/proc/stb/info/chipset", 'r') chipset = f.readline().strip() f.close() info['chipset'] = chipset memFree = 0 file = open("/proc/meminfo", 'r') for line in file: parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip() elif key in ("MemFree", "Buffers", "Cached"): memFree += int(parts[1].strip().split(' ', 1)[0]) info['mem2'] = "%s kB" % memFree file.close() try: f = open("/proc/uptime", "rb") uptime = int(float(f.readline().split(' ', 2)[0].strip())) f.close() uptimetext = '' if uptime > 86400: d = uptime / 86400 uptime = uptime % 86400 uptimetext += '%dd ' % d uptimetext += "%d:%.2d" % (uptime / 3600, (uptime % 3600) / 60) except: uptimetext = "?" info['uptime'] = uptimetext info["webifver"] = getOpenWebifVer() info['imagedistro'] = getImageDistro() info['imagever'] = getImageVersion() + '.' + getImageBuild() info['enigmaver'] = getEnigmaVersionString() info['kernelver'] = about.getKernelVersionString() try: from Tools.StbHardware import getFPVersion except ImportError: from Tools.DreamboxHardware import getFPVersion info['fp_version'] = getFPVersion() info['tuners'] = [] for i in range(0, nimmanager.getSlotCount()): info['tuners'].append({ "name": nimmanager.getNim(i).getSlotName(), "type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")" }) info['ifaces'] = [] ifaces = iNetwork.getConfiguredAdapters() for iface in ifaces: info['ifaces'].append({ "name": iNetwork.getAdapterName(iface), "mac": iNetwork.getAdapterAttribute(iface, "mac"), "dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"), "ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")), "mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")), "gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway")) }) info['hdd'] = [] for hdd in harddiskmanager.hdd: if hdd.free() <= 1024: free = "%i MB" % (hdd.free()) else: free = float(hdd.free()) / float(1024) free = "%.3f GB" % free info['hdd'].append({ "model": hdd.model(), "capacity": hdd.capacity(), "free": free }) return info
def getRcFolder(self): remotefolder = 'dmm0' if os.path.exists('/proc/stb/info/azmodel'): f = open("/proc/stb/info/model", 'r') model = f.readline().strip() f.close() if model == "premium" or model == "premium+": remotefolder = 'azboxhd' elif model == "elite" or model == "ultra": remotefolder = 'azboxelite' elif model == "me" or model == "minime": remotefolder = 'azboxme' elif boxtype in ('enfinity'): remotefolder = 'evo1' elif boxtype in ('broadmedia300'): remotefolder = 'g300' elif boxtype in ('sf108'): remotefolder = 'sf108' elif boxtype in ('sf3038'): remotefolder = 'sf3038' elif boxtype in ('x2plus'): remotefolder = 'evo2' elif boxtype in ('xcombo', 'x1plus'): remotefolder = 'evo3' elif boxtype in ('bre2ze'): remotefolder = 'wwio1' elif boxtype in ('nano', 'nanoc'): remotefolder = 'wwio2' elif boxtype in ('nanopro'): remotefolder = 'nanopro' elif boxtype in ('enibox'): remotefolder = 'hdbox' elif boxtype in ('mago'): remotefolder = 'relook' elif boxtype in ('tyrant'): remotefolder = 'tyrant' elif boxtype in ('marvel1'): remotefolder = 'visionnet' elif boxtype in ('zgemmash1', 'zgemmas2s'): remotefolder = 'zgemma1' elif boxtype in ('zgemmash2', 'zgemmass'): remotefolder = 'zgemma2' elif boxtype in ('gbquad', 'gb800se', 'gb800ue', 'gb800solo', 'gb800seplus', 'gb800ueplus', 'gbipbox', 'gbultrase', 'gbultraue', 'gbx1'): remotefolder = 'gb0' elif boxtype == 'gbquadplus': remotefolder = 'gb1' elif boxtype in ('mutant1100', 'mutant1200', 'mutant500c'): remotefolder = 'hd1100' elif boxtype in ('mutant2400', 'quadbox2400'): remotefolder = 'hd2400' elif machinebrand == 'Jepssen': remotefolder = 'mediabox' elif boxtype in ('iqonios100hd', 'iqonios200hd', 'iqonios300hd', 'iqonios300hdv2', 'roxxs200hd', 'mediaart200hd'): remotefolder = 'iqon1' elif boxtype in ('force1', 'force1plus', 'worldvisionf1', 'worldvisionf1plus', 'force2', 'force2plus'): remotefolder = 'iqon2' elif boxtype in ('formuler1', 'formuler3'): remotefolder = 'formuler1' elif boxtype in ('triplex'): remotefolder = 'triplex' elif boxtype == 'dm8000': remotefolder = 'dmm0' elif boxtype in ('dm800', 'dm800se', 'dm500hd'): remotefolder = 'dmm1' elif boxtype in ('dm7080', 'dm7020hd', 'dm7020hdv2', 'dm800sev2', 'dm500hdv2', 'dm820'): remotefolder = 'dmm2' elif boxtype in ('tmtwin', 'tm2t'): remotefolder = 'tm1' elif boxtype in ('tmsingle', 'tmnano', 'tmnano2t', 'tmnano3t', 'tmnano2super'): remotefolder = 'tm2' elif boxtype in ('tmnanose', 'tmnanosecombo'): remotefolder = 'tm3' elif boxtype == 'uniboxhd1': fp_version = str(getFPVersion()) if fp_version.startswith('1'): remotefolder = 'ini0' else: remotefolder = 'ini2' elif boxtype in ('uniboxhd2', 'uniboxhd3'): remotefolder = 'ini1' elif boxtype == 'uniboxhde': remotefolder = 'uniboxhde' elif boxtype in ('sezam1000hd', 'sezam5000hd'): remotefolder = 'ini2' elif machinebrand == 'Miraclebox': remotefolder = 'ini3' elif machinebrand in ('GI', 'Atemio') or boxtype in ('sezammarvel'): remotefolder = 'ini4' elif machinebrand == 'Beyonwiz': remotefolder = 'ini5' elif machinebrand == 'SPACE': remotefolder = 'ini6' elif boxtype in ('megaforce2'): remotefolder = 'megasat1' elif boxtype in ('megaforce1plus'): remotefolder = 'megasat2' elif boxtype in ('optimussos', 'optimussos1', 'optimussos2', 'optimussos1plus', 'optimussos2plus'): remotefolder = 'optimuss1' elif boxtype in ('optimussos3plus'): remotefolder = 'optimuss2' elif boxtype == 'sogno8800hd': remotefolder = 'sogno' elif boxtype in ('et4x00'): remotefolder = 'et4x00' elif boxtype in ('et6x00', 'et6000', 'et5x00', 'et5000'): remotefolder = 'et6x00' elif boxtype == 'et6500': remotefolder = 'et6500' elif boxtype in ('et8000', 'et8500', 'et10000'): remotefolder = 'et8000' elif boxtype in ('et9000', 'et9x00', 'et9200'): remotefolder = 'et9x00' elif boxtype in ('et9500'): remotefolder = 'et9500' elif boxtype in ('et7000', 'et7500'): remotefolder = 'et7x00' elif boxtype in ('vusolo', 'vusolo2', 'vusolose', 'vuduo', 'vuuno', 'vuzero'): remotefolder = 'vu' elif boxtype == 'vuultimo': remotefolder = 'vu2' elif boxtype == 'vuduo2': remotefolder = 'vu3' elif boxtype in ('starsatlx', 'axodin', 'axodinc', 'odinm6'): remotefolder = 'odinm6' elif boxtype in ('ixussone'): remotefolder = 'ixussone' elif boxtype in ('ixusszero'): remotefolder = 'ixusszero' elif boxtype in ('tomcat'): remotefolder = 'xcore1' elif machinebuild == 'cube': remotefolder = 'cube' elif machinebuild.startswith('ebox'): remotefolder = 'ebox5000' elif machinebuild == 'e3hd': remotefolder = 'e3hd' elif machinebuild == 'odinm7': remotefolder = 'odinm7' elif machinebuild == 'odinm9': remotefolder = 'odinm9' elif machinebuild == 'xp1000': remotefolder = 'xp1000' elif brandoem == 'fulan': remotefolder = 'fulan' return remotefolder
def getRcFolder(self, GetDefault=False): if not GetDefault: ret = self.readE2Settings() if ret is not None: return ret remotefolder = 'dmm0' if os.path.exists('/proc/stb/info/azmodel'): f = open("/proc/stb/info/model",'r') model = f.readline().strip() f.close() if model == "premium" or model == "premium+": remotefolder = 'azboxhd' elif model == "elite" or model == "ultra": remotefolder = 'azboxelite' elif model == "me" or model == "minime": remotefolder = 'azboxme' elif boxtype in ('vipert2c','vipercombo'): remotefolder = 'amiko2' elif boxtype in ('vipercombohdd'): remotefolder = 'amiko1' elif boxtype in ('enfinity'): remotefolder = 'evo1' elif boxtype in ('alphatriple'): remotefolder = 'sab1' elif boxtype in ('sf108'): remotefolder = 'sf108' elif boxtype in ('sf3038','sf128','sf138','sf4008'): remotefolder = 'sf3038' elif boxtype in ('sf5008'): remotefolder = 'sf5008' elif boxtype in ('sf98'): remotefolder = 'sf98' elif boxtype in ('x2plus'): remotefolder = 'evo2' elif boxtype in ('xcombo', 'x1plus'): remotefolder = 'evo3' elif boxtype in ('t2cable'): remotefolder = 'evo4' elif boxtype in ('evomini', 'evominiplus'): remotefolder = 'evo5' elif boxtype in ('novaip'): remotefolder = 'evo6' elif boxtype in ('novacombo', 'novatwin'): remotefolder = 'evo7' elif boxtype in ('bre2ze','bre2ze4k','bre2zet2c'): remotefolder = 'wwio1' elif boxtype in ('tiviarmin'): remotefolder = 'tiviar1' elif boxtype in ('tiviaraplus'): remotefolder = 'tiviar2' elif boxtype in ('twinboxlcd'): remotefolder = 'red1' elif boxtype in ('singleboxlcd', 'twinboxlcdci', 'twinboxlcdci5'): remotefolder = 'red2' elif boxtype in ('sf208', 'sf228', 'sf238'): remotefolder = 'sf2x8' elif boxtype in ('odin2hybrid', 'odinplus'): remotefolder = 'ax1' elif boxtype in ('ax51','axultra'): remotefolder = 'ax51' elif boxtype in ('e4hd', 'e4hdhybrid'): remotefolder = 'e4hd' elif boxtype in ('e4hdcombo','e4hdultra'): remotefolder = 'e4hdcombo' elif boxtype in ('enibox'): remotefolder = 'hdbox' elif boxtype in ('mago'): remotefolder = 'relook' elif boxtype in ('tyrant'): remotefolder = 'tyrant' elif boxtype in ('marvel1'): remotefolder = 'visionnet' elif boxtype in ('9900lx'): remotefolder = 'protek1' elif boxtype in ('9910lx','9911lx'): remotefolder = 'protek2' elif boxtype in ('zgemmash1', 'zgemmas2s'): remotefolder = 'zgemma1' elif boxtype in ('zgemmash2', 'zgemmass', 'zgemmaslc'): remotefolder = 'zgemma2' elif boxtype in ('zgemmah6','zgemmah4','zgemmahs', 'zgemmah2s', 'zgemmah2h','zgemmah5','zgemmah52s','zgemmah3ac','zgemmah5ac','zgemmah52tc','zgemmah32tc','zgemmah7','zgemmah7s','zgemmah7c','zgemmah52splus', 'zgemmah2splus'): remotefolder = 'zgemma3' elif boxtype in ('zgemmai55'): remotefolder = 'zgemma5' elif boxtype in ('gbquad', 'gb800se', 'gb800ue', 'gb800solo', 'gb800seplus', 'gb800ueplus', 'gbipbox', 'gbultrase', 'gbultraue', 'gbx1', 'gbx3'): remotefolder = 'gb0' elif boxtype == 'gbquadplus': remotefolder = 'gb1' elif boxtype in ('gbx2', 'gbx3h', 'gbultraueh'): remotefolder = 'gb2' elif boxtype in ('gbquad4k','gbue4k'): remotefolder = 'gb3' elif boxtype in ('mutant11', 'mutant1100', 'mutant1200', 'mutant530c', 'mutant500c', 'vizyonvita', 'mutant1265', 'mutant1500', 'mutant51', 'bcm7251s', 'vimastec1000', 'vimastec1500'): remotefolder = 'hd1100' elif boxtype in ('mutant2400', 'quadbox2400', 'bcm7252'): remotefolder = 'hd2400' elif boxtype in ('revo4k','galaxy4k'): remotefolder = 'revo' elif machinebrand == 'Jepssen': remotefolder = 'mediabox' elif machinebrand == 'XSARIUS': remotefolder = 'fusionhd' elif boxtype in ('iqonios100hd', 'iqonios200hd', 'iqonios300hd', 'iqonios300hdv2', 'roxxs200hd', 'mediaart200hd', 'force2se', 'force2', 'force2plus', 'force2plushv', 'force2nano'): remotefolder = 'iqon1' elif boxtype in ('force1', 'force1plus', 'worldvisionf1', 'worldvisionf1plus'): remotefolder = 'iqon2' elif boxtype in ('force3uhdplus','force3uhd'): remotefolder = 'iqon3' elif boxtype in ('lunix34k','lunix'): remotefolder = 'qviart1' elif boxtype in ('formuler1', 'formuler3', 'formuler4', 'formuler4turbo', 'formuler1tc', 'formuler3ip', 'formuler4ip'): remotefolder = 'formuler1' elif boxtype in ('triplex', 'ultrabox'): remotefolder = 'triplex' elif boxtype == 'dm8000': remotefolder = 'dmm0' elif boxtype in ('dm800', 'dm800se', 'dm500hd'): remotefolder = 'dmm1' elif boxtype in ('dm7080', 'dm7020hd', 'dm7020hdv2', 'dm800sev2', 'dm500hdv2', 'dm820', 'dm520', 'dm525', 'dm900', 'dm920'): remotefolder = 'dmm2' elif boxtype in ('tmtwin', 'tm2t'): remotefolder = 'tm1' elif boxtype in ('tmsingle', 'tmnano', 'tmnano2t', 'tmnano3t', 'tmnano2super'): remotefolder = 'tm2' elif boxtype in ('tmnanose', 'tmnanosecombo'): remotefolder = 'tm3' elif boxtype in ('tmnanosem2', 'tmnanoseplus','tmnanosem2plus'): remotefolder = 'tm4' elif boxtype in ('tmnanom3'): remotefolder = 'tm5' elif boxtype in ('tmtwin4k','tm4ksuper'): remotefolder = 'tm6' elif boxtype == 'uniboxhd1': fp_version = str(getFPVersion()) if fp_version.startswith('1'): remotefolder = 'ini0' else: remotefolder = 'ini2' elif boxtype in ('uniboxhd2', 'uniboxhd3'): remotefolder = 'ini1' elif boxtype == 'uniboxhde': remotefolder = 'uniboxhde' elif boxtype in ('sezam1000hd', 'sezam5000hd'): remotefolder = 'ini2' elif boxtype in ('xpeedlxcs2', 'xpeedlxcc'): remotefolder = 'gi1' elif machinebrand == 'Miraclebox': if boxtype in ('mbmicro', 'mbmicrov2', 'mbtwinplus'): remotefolder = 'miraclebox' else: remotefolder = 'ini3' elif boxtype in ('xpeedlx', 'xpeedlx1', 'xpeedlx2', 'xpeedlx3', 'atemio5x00', 'atemio6000', 'atemio6100', 'atemio6200', 'atemionemesis', 'sezammarvel'): remotefolder = 'ini4' elif boxtype in ('beyonwizt3'): remotefolder = 'ini5' elif boxtype in ('beyonwizt2', 'beyonwizt4'): remotefolder = 'ini7' elif boxtype in ('beyonwizu4'): remotefolder = 'beyonwiz1' elif machinebrand in ('SPACE', 'FEGASUS') or boxtype in ('xpeedlxpro'): remotefolder = 'ini6' elif boxtype in ('opticumtt'): remotefolder = 'ini8' elif boxtype in ('megaforce2'): remotefolder = 'megasat1' elif boxtype in ('megaforce1plus'): remotefolder = 'megasat2' elif boxtype in ('optimussos', 'optimussos1', 'optimussos2', 'optimussos1plus', 'optimussos2plus'): remotefolder = 'optimuss1' elif boxtype in ('optimussos3plus'): remotefolder = 'optimuss2' elif boxtype == 'sogno8800hd': remotefolder = 'sogno' elif boxtype in ('et4x00'): remotefolder = 'et4x00' elif boxtype in ('et6x00', 'et6000', 'et5x00', 'et5000'): remotefolder = 'et6x00' elif boxtype == 'et6500': remotefolder = 'et6500' elif boxtype in ('et8000', 'et8500' , 'et8500s', 'et10000'): remotefolder = 'et8000' elif boxtype in ('et9000', 'et9x00', 'et9200'): remotefolder = 'et9x00' elif boxtype in ('et9500'): remotefolder = 'et9500' elif boxtype in ('et7000', 'et7500', 'et7100'): remotefolder = 'et7x00' elif boxtype in ('et7x00mini','gi11000'): remotefolder = 'et7x00mini' elif boxtype in ('vusolo', 'vusolo2', 'vusolose', 'vuduo', 'vuuno', 'vuzero', 'vusolo4k', 'vuuno4k', 'vuultimo4k'): remotefolder = 'vu' elif boxtype == 'vuultimo': remotefolder = 'vu2' elif boxtype == 'vuduo2': remotefolder = 'vu3' elif boxtype in ('starsatlx', 'axodin', 'axodinc', 'odinm6'): remotefolder = 'odinm6' elif boxtype in ('ixussone'): remotefolder = 'ixussone' elif boxtype in ('ixusszero'): remotefolder = 'ixusszero' elif boxtype in ('bcm7358', 'vp7358ci'): remotefolder = 'xcore2' elif boxtype in ('spycat','spycatmini','spycatminiplus','spycat4kmini','spycat4k','spycat4kcombo'): remotefolder = 'xcore1' elif boxtype in ('osmini', 'osminiplus', 'osmega'): remotefolder = 'xcore3' elif boxtype in ('osnino'): remotefolder = 'edision1' elif machinebuild == 'cube': remotefolder = 'cube' elif machinebuild.startswith('ebox'): remotefolder = 'ebox5000' elif machinebuild == 'e3hd': remotefolder = 'e3hd' elif machinebuild == 'odinm7': remotefolder = 'odinm7' elif machinebuild == 'odinm9': remotefolder = 'odinm9' elif machinebuild == 'xp1000': remotefolder = 'xp1000' elif brandoem == 'fulan': remotefolder = 'fulan' elif boxtype in ('evoslim','evoslimse','evoslimt2c'): remotefolder = 'evo8' elif boxtype in ('wetekplay'): remotefolder = 'wetek' elif boxtype in ('wetekplay2'): remotefolder = 'wetek2' elif boxtype in ('wetekhub'): remotefolder = 'wetek3' elif boxtype in ('odroidc2'): remotefolder = 'hardkernel' elif boxtype in ('valalinux'): remotefolder = 'vala' return remotefolder
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString() AboutText += _("CPU:\t%s\n") % about.getCPUString().replace('bcm', 'BCM') AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString() AboutText += _("Cores:\t%s\n") % about.getCpuCoresString() imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title()) skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(" (%s x %s)") % (skinWidth, skinHeight) + "\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 temp:\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 temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" 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) self["AboutScrollLabel"] = ScrollLabel(AboutText)
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'] = getMachineBrand() info['model'] = getMachineName() info['boxtype'] = getBoxType() info['machinebuild'] = getMachineBuild() chipset = "unknown" if fileExists("/etc/.box"): f = open("/etc/.box", 'r') model = f.readline().strip().lower() f.close() if model.startswith("ufs") or model.startswith("ufc"): if model in ("ufs910", "ufs922", "ufc960"): chipset = "SH4 @266MHz" else: chipset = "SH4 @450MHz" elif model in ("topf", "tf7700hdpvr"): chipset = "SH4 @266MHz" elif model.startswith("azbox"): f = open("/proc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif model.startswith("spark"): if model == "spark7162": chipset = "SH4 @540MHz" else: chipset = "SH4 @450MHz" elif fileExists("/proc/stb/info/azmodel"): f = open("/proc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif fileExists("/proc/stb/info/model"): f = open("/proc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model == "tf7700hdpvr": chipset = "SH4 @266MHz" elif model == "nbox": chipset = "STi7100 @266MHz" elif model == "arivalink200": chipset = "STi7109 @266MHz" elif model in ("adb2850", "adb2849", "dsi87"): chipset = "STi7111 @450MHz" elif model in ("sagemcom88", "esi88"): chipset = "STi7105 @450MHz" elif model.startswith("spark"): if model == "spark7162": chipset = "STi7162 @540MHz" else: chipset = "STi7111 @450MHz" if fileExists("/proc/stb/info/chipset"): f = open("/proc/stb/info/chipset", 'r') chipset = f.readline().strip() f.close() info['chipset'] = chipset memFree = 0 for line in open("/proc/meminfo", 'r'): parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip().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']) try: f = open("/proc/uptime", "rb") uptime = int(float(f.readline().split(' ', 2)[0].strip())) f.close() uptimetext = '' if uptime > 86400: d = uptime / 86400 uptime = uptime % 86400 uptimetext += '%dd ' % d uptimetext += "%d:%.2d" % (uptime / 3600, (uptime % 3600) / 60) except: uptimetext = "?" info['uptime'] = uptimetext info["webifver"] = getOpenWebifVer() info['imagedistro'] = getImageDistro() info['friendlyimagedistro'] = getFriendlyImageDistro() info['oever'] = getOEVersion() info['imagever'] = getImageVersion() ib = getImageBuild() if ib: info['imagever'] = info['imagever'] + "." + ib info['enigmaver'] = getEnigmaVersionString() info['driverdate'] = getDriverDate() info['kernelver'] = about.getKernelVersionString() try: from Tools.StbHardware import getFPVersion except ImportError: from Tools.DreamboxHardware import getFPVersion try: info['fp_version'] = getFPVersion() except: info['fp_version'] = None friendlychipsetdescription = _("Chipset") friendlychipsettext = info['chipset'].replace("bcm", "Broadcom ") if friendlychipsettext in ("7335", "7356", "7362", "73625", "7424", "7425", "7429"): friendlychipsettext = "Broadcom " + friendlychipsettext if not (info['fp_version'] is None or info['fp_version'] == 0): friendlychipsetdescription = friendlychipsetdescription + " (" + _( "Frontprocessor Version") + ")" friendlychipsettext = friendlychipsettext + " (" + str( info['fp_version']) + ")" info['friendlychipsetdescription'] = friendlychipsetdescription info['friendlychipsettext'] = friendlychipsettext info['tuners'] = [] for i in 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 = int((stat.f_bfree / 1024) * (stat.f_bsize / 1024)) 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 file(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] is "": 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: 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['transcoding'] = False if (info['model'] in ("Uno4K", "Ultimo4K", "Solo4K", "Solo²", "Duo²", "Solo SE", "Quad", "Quad Plus") or info['machinebuild'] in ('inihdp', 'hd2400', 'et10000', 'et13000', 'sf5008', 'xpeedlx3', 'ew7356', 'dags7356', 'dags7252', 'formuler1tc', 'gb7356', 'gb7252', 'tiviaraplus', '8100s')): if os.path.exists( eEnv.resolve( '${libdir}/enigma2/python/Plugins/SystemPlugins/TransCodingSetup/plugin.pyo' ) ) or os.path.exists( eEnv.resolve( '${libdir}/enigma2/python/Plugins/SystemPlugins/TranscodingSetup/plugin.pyo' ) ) or os.path.exists( eEnv.resolve( '${libdir}/enigma2/python/Plugins/SystemPlugins/MultiTransCodingSetup/plugin.pyo' )): info['transcoding'] = True info['kinopoisk'] = False lang = ['ru', 'uk', 'lv', 'lt', 'et'] for l in lang: if l in language.getLanguage(): info['kinopoisk'] = True info['EX'] = '' if session: try: 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 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( timer.service_ref.getServiceName().replace( '\xc2\x86', '').replace('\xc2\x87', '')) print "[OpenWebif] -D- timer '%s'" % timer.service_ref.getServiceName( ) # only 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, error: info['EX'] = error
def getInfo(): # TODO: get webif versione somewhere! info = {} info['brand'] = getMachineBrand() info['model'] = getMachineName() info['boxtype'] = getBoxType() info['machinebuild'] = getMachineBuild() chipset = "unknown" if fileExists("/etc/.box"): f = open("/etc/.box", 'r') model = f.readline().strip().lower() f.close() if model.startswith("ufs") or model.startswith("ufc"): if model in ("ufs910", "ufs922", "ufc960"): chipset = "SH4 @266MHz" else: chipset = "SH4 @450MHz" elif model in ("topf", "tf7700hdpvr"): chipset = "SH4 @266MHz" elif model.startswith("azbox"): f = open("/usr/local/e2/etc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif model.startswith("spark"): if model == "spark7162": chipset = "SH4 @540MHz" else: chipset = "SH4 @450MHz" elif fileExists("/usr/local/e2/etc/stb/info/azmodel"): f = open("/usr/local/e2/etc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" else: f = open("/usr/local/e2/etc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model in ("esi88", "sagemcom88", "nbox"): if fileExists("/proc/boxtype"): f = open("/proc/boxtype", 'r') model = f.readline().strip().lower() f.close() if model == "tf7700hdpvr": chipset = "SH4 @266MHz" elif model in ("nbox", "bska", "bsla", "bxzb", "bzzb"): chipset = "SH4 @266MHz" elif model in ("adb2850", "adb2849"): chipset = "SH4 @450MHz" elif model in ("sagemcom88", "esi88", "uhd88", "dsi87"): chipset = "SH4 @450MHz" if fileExists("/usr/local/e2/etc/stb/info/chipset"): f = open("/usr/local/e2/etc/stb/info/chipset", 'r') chipset = f.readline().strip() f.close() info['chipset'] = chipset memFree = 0 for line in open("/proc/meminfo", 'r'): parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip() elif key in ("MemFree", "Buffers", "Cached"): memFree += int(parts[1].strip().split(' ', 1)[0]) info['mem2'] = "%s kB" % memFree try: f = open("/proc/uptime", "rb") uptime = int(float(f.readline().split(' ', 2)[0].strip())) f.close() uptimetext = '' if uptime > 86400: d = uptime / 86400 uptime = uptime % 86400 uptimetext += '%dd ' % d uptimetext += "%d:%.2d" % (uptime / 3600, (uptime % 3600) / 60) except: uptimetext = "?" info['uptime'] = uptimetext info["webifver"] = getOpenWebifVer() info['imagedistro'] = getImageDistro() info['oever'] = getOEVersion() info['imagever'] = getImageVersion() + '.' + getImageBuild() info['enigmaver'] = getEnigmaVersionString() info['driverdate'] = getDriverDate() info['kernelver'] = about.getKernelVersionString() try: from Tools.StbHardware import getFPVersion except ImportError: from Tools.DreamboxHardware import getFPVersion info['fp_version'] = getFPVersion() info['tuners'] = [] for i in range(0, nimmanager.getSlotCount()): info['tuners'].append({ "name": nimmanager.getNim(i).getSlotName(), "type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")" }) info['ifaces'] = [] ifaces = iNetwork.getConfiguredAdapters() for iface in ifaces: info['ifaces'].append({ "name": iNetwork.getAdapterName(iface), "mac": iNetwork.getAdapterAttribute(iface, "mac"), "dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"), "ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")), "mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")), "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'], "firstpublic": getAdapterIPv6(iface)['firstpublic'] }) info['hdd'] = [] for hdd in harddiskmanager.hdd: dev = hdd.findMount() if dev: stat = os.statvfs(dev) free = int((stat.f_bfree / 1024) * (stat.f_bsize / 1024)) else: free = -1 if free <= 1024: free = "%i MB" % free else: free = free / 1024. free = "%.3f GB" % free size = hdd.diskSize() * 1000000 / 1048576. if size > 1048576: size = "%.2f TB" % (size / 1048576.) elif size > 1024: size = "%.1f GB" % (size / 1024.) else: size = "%d MB" % size 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 TB" % iecsize else: iecsize = "%d TB" % iecsize # Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB elif iecsize > 300000: iecsize = "%d GB" % ((iecsize + 5000) // 10000 * 10) # ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB elif iecsize > 1000: iecsize = "%d GB" % ((iecsize + 500) // 1000) else: iecsize = "%d MB" % iecsize info['hdd'].append({ "model": hdd.model(), "capacity": size, "labelled_capacity": iecsize, "free": free }) global STATICBOXINFO STATICBOXINFO = info return info
def getInfo(): # TODO: get webif versione somewhere! info = {} brand = "Dream Multimedia" model = "unknown" chipset = "unknown" if fileExists("/etc/.box"): brand = "HDMU" f = open("/etc/.box",'r') model = f.readline().strip().lower() if model.startswith("et"): brand = "Xtrend" elif model.startswith("vu"): brand = "VuPlus" elif model.startswith("gb"): brand = "GigaBlue" elif model.startswith("ufs") or model.startswith("ufc"): brand = "Kathrein" if model in ("ufs910", "ufs922", "ufc960"): chipset = "SH4 @266MHz" else: chipset = "SH4 @450MHz" elif model.startswith("xpeed"): brand = "GoldenInterstar" elif model.startswith("topf"): brand = "Topfield" chipset = "SH4 @266MHz" elif model.startswith("azbox"): brand = "AZBox" f = open("/proc/stb/info/model",'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif model.startswith("spark"): brand = "Fulan" chipset = "SH4 @450MHz" elif fileExists("/proc/stb/info/hwmodel",'r'): # divide to brand model. f = open("/proc/stb/info/hwmodel",'r') f_model = f.readline().strip().lower() if f_model.startswith("me"): model = "Mediabox HD LX-1" brand = "Jepssen" elif f_model.startswith("op"): model = f_model[0:1].upper() + f_model[1:8].lower() + " " + f_model[8:].upper() # optimussos1 ==> Optimuss OS1 brand = "Edision" elif f_model.startswith("force1p"): if fileExists("/etc/.brandtype"): b = open("/etc/.brandtype",'r') b_brand = b.readline().strip().lower() if b_brand.startswith("ed"): model = "Optimuss OS3+" brand = "Edision" elif b_brand.startswith("te"): model = "TM-NANO-3T COMBO" brand = "Technomate" elif b_brand.startswith("sw"): model = "Force1+" brand = "4D" elif b_brand.startswith("wo"): model = "Force1+" brand = "Worldvision" else: model = "Force1+" brand = "Iqon" b.close() elif f_model.startswith("optimussos"): model = "Optimuss OS" brand = "Edision" elif f_model.startswith("force2plus"): model = "force2plus" brand = "Iqon" elif f_model.startswith("force2se"): model = "force2se" brand = "Iqon" elif f_model.startswith("force2"): model = "force2" brand = "Iqon" elif f_model.startswith("force2nano"): model = "force2nano" brand = "Iqon" elif f_model.startswith("tmnanosecombo"): model = "TM-NANO-SE Combo" brand = "Technomate" elif f_model.startswith("tmnanosem2"): model = "TM-NANO-SE M2" brand = "Technomate" elif f_model.startswith("tmnanoseplus"): model = "TM-NANO-SE Plus" brand = "Technomate" elif f_model.startswith("tmnanose"): model = "TM-NANO-SE" brand = "Technomate" elif f_model.startswith("tmnanom3"): model = "TM-NANO M3" brand = "Technomate" elif f_model.startswith("fusionhdse"): model = "FUSION HD SE" brand = "Xsarius" elif f_model.startswith("fusionhd"): model = "FUSION HD" brand = "Xsarius" elif f_model.startswith("purehd"): model = "PURE HD" if fileExists("/etc/.brandtype"): b = open("/etc/.brandtype",'r') b_brand = b.readline().strip().lower() brand = b_brand[0:1].upper() + b_brand[1:].lower() b.close() elif f_model.startswith("selfsat"): model = "SELF SAT" if fileExists("/etc/.brandtype"): b = open("/etc/.brandtype",'r') b_brand = b.readline().strip().lower() brand = b_brand[0:1].upper() + b_brand[1:].lower() b.close() else: model = f_model if fileExists("/etc/.brandtype"): b = open("/etc/.brandtype",'r') b_brand = b.readline().strip().lower() brand = b_brand[0:1].upper() + b_brand[1:].lower() b.close() f.close() elif fileExists("/proc/stb/info/boxtype"): brand = "Xtrend" f = open("/proc/stb/info/boxtype",'r') model = f.readline().strip().lower() if model.startswith("et"): brand = "Xtrend" elif model.startswith("ini"): if model.endswith("sv"): brand = "MiracleBox" elif model.endswith("ru"): brand = "Sezam" else: brand = "Venton" elif model.startswith("xp"): brand = "MaxDigital" elif model.startswith("ixuss"): brand = "Medialink" model = model.replace(" ", "") f.close() elif fileExists("/proc/stb/info/vumodel"): brand = "VuPlus" f = open("/proc/stb/info/vumodel",'r') model = f.readline().strip().lower() f.close() elif fileExists("/proc/stb/info/azmodel"): brand = "AZBox" f = open("/proc/stb/info/model",'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" else: f = open("/proc/stb/info/model",'r') model = f.readline().strip().lower() f.close() if model == "tf7700hdpvr": brand = "Topfield" chipset = "SH4 @266MHz" elif model == "nbox": brand = "Advanced Digital Broadcast" chipset = "SH4 @266MHz" elif model in ("adb2850", "adb2849"): brand = "Advanced Digital Broadcast" chipset = "SH4 @450MHz" elif model in ("esi88", "uhd88", "dsi87"): brand = "SagemCom" chipset = "SH4 @450MHz" info['brand'] = brand info['model'] = model if fileExists("/proc/stb/info/chipset"): f = open("/proc/stb/info/chipset",'r') chipset = f.readline().strip() f.close() info['chipset'] = chipset memFree = 0 for line in open("/proc/meminfo",'r'): parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip() elif key in ("MemFree", "Buffers", "Cached"): memFree += int(parts[1].strip().split(' ',1)[0]) info['mem2'] = "%s kB" % memFree try: f = open("/proc/uptime", "rb") uptime = int(float(f.readline().split(' ', 2)[0].strip())) f.close() uptimetext = '' if uptime > 86400: d = uptime/86400 uptime = uptime % 86400 uptimetext += '%dd ' % d uptimetext += "%d:%.2d" % (uptime/3600, (uptime%3600)/60) except: uptimetext = "?" info['uptime'] = uptimetext if fileExists("/etc/bhversion"): f = open("/etc/bhversion",'r') imagever = f.readline().strip() f.close() elif fileExists("/etc/vtiversion.info"): f = open("/etc/vtiversion.info",'r') imagever = f.readline().strip() f.close() else: imagever = about.getImageVersionString() info["webifver"] = getOpenWebifVer() info['imagever'] = imagever info['enigmaver'] = about.getEnigmaVersionString() info['kernelver'] = about.getKernelVersionString() try: from Tools.StbHardware import getFPVersion except ImportError: from Tools.DreamboxHardware import getFPVersion info['fp_version'] = getFPVersion() info['tuners'] = [] for i in range(0, nimmanager.getSlotCount()): info['tuners'].append({ "name": nimmanager.getNim(i).getSlotName(), "type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")" }) info['ifaces'] = [] ifaces = iNetwork.getConfiguredAdapters() for iface in ifaces: info['ifaces'].append({ "name": iNetwork.getAdapterName(iface), "mac": iNetwork.getAdapterAttribute(iface, "mac"), "dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"), "ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")), "mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")), "gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway")), "ipv6": getAdapterIPv6(iface) }) info['hdd'] = [] for hdd in harddiskmanager.hdd: if hdd.free() <= 1024: free = "%i MB" % (hdd.free()) else: free = float(hdd.free()) / float(1024) free = "%.3f GB" % free info['hdd'].append({ "model": hdd.model(), "capacity": hdd.capacity(), "free": free }) return info
def populate(self): def netspeed(): netspeed = "" for line in popen('ethtool eth0 |grep Speed', 'r'): line = line.strip().split(":") line = line[1].replace(' ', '') netspeed += line return str(netspeed) def netspeed_eth1(): netspeed = "" for line in popen('ethtool eth1 |grep Speed', 'r'): line = line.strip().split(":") line = line[1].replace(' ', '') netspeed += line return str(netspeed) def netspeed_ra0(): netspeed = "" for line in popen('iwconfig ra0 | grep Bit | cut -c 20-30', 'r'): line = line.strip() netspeed += line return str(netspeed) def netspeed_wlan0(): netspeed = "" for line in popen('iwconfig wlan0 | grep Bit | cut -c 20-30', 'r'): line = line.strip() netspeed += line return str(netspeed) def netspeed_wlan1(): netspeed = "" for line in popen('iwconfig wlan1 | grep Bit | cut -c 20-30', 'r'): line = line.strip() netspeed += line return str(netspeed) def freeflash(): freeflash = "" for line in popen( "df -mh / | grep -v '^Filesystem' | awk '{print $4}'", 'r'): line = line.strip() freeflash += line return str(freeflash) self["lab1"] = StaticText(_("openHDF")) self["lab2"] = StaticText(_("Support at") + " www.HDFreaks.cc") model = None AboutText = "" self["lab2"] = StaticText(_("Support @") + " www.hdfreaks.cc") AboutText += _("Model:\t%s %s - OEM Model: %s\n") % ( getMachineBrand(), getMachineName(), getBrandOEM()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n" 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 = "" 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() BootLoaderVersion = 0 try: if bootloader: AboutText += _("Bootloader:\t%s\n") % (bootloader) BootLoaderVersion = int(bootloader[1:]) except: BootLoaderVersion = 0 if getMachineBuild() in ('vusolo4k', 'gbx34k'): cpuMHz = " (1,5 GHz)" elif getMachineBuild() in ('u41', 'u42'): cpuMHz = " (1,0 GHz)" elif getMachineBuild() in ('vuuno4k', 'dm900', 'gb7252', 'dags7252'): cpuMHz = " (1,7 GHz)" elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex'): cpuMHz = " (1,3 GHz)" elif getMachineBuild() in ('u5', 'u51', 'u52', 'u53', 'u5pvr', 'h9', 'sf8008', 'sf8008s', 'sf8008t', 'hd60', "hd61", 'i55plus'): cpuMHz = " (1,6 GHz)" elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51', 'sf4008', 'vs1500', 'h7', 'osmio4k', 'osmio4kplus', 'osmini4k'): 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 bogoMIPS = "" if res: cpuMHz = "" + res.replace("\n", "") + " MHz" if res2: bogoMIPS = "" + res2.replace("\n", "") if getMachineBuild() in ('vusolo4k', 'hd51', 'hd52', 'sf4008', 'dm900', 'h7', 'gb7252', '8100s'): AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n" else: AboutText += _( "CPU:\t%s") % about.getCPUString() + " " + cpuMHz + "\n" dMIPS = 0 if getMachineBuild() in ('vusolo4k'): dMIPS = "10.500" elif getMachineBuild() in ('hd52', 'hd51', 'sf4008', 'dm900', 'h7', 'gb7252', '8100s'): dMIPS = "12.000" if getMachineBuild() in ('vusolo4k', 'hd51', 'hd52', 'sf4008', 'dm900', 'h7', 'gb7252', '8100s'): AboutText += _("DMIPS:\t") + dMIPS + "\n" else: AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\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() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System Temp:\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'): f = open('/proc/stb/power/avs', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: for line in open('/proc/hisi/msp/pm_cpu').readlines(): line = [x.strip() for x in line.strip().split(":")] if line[0] in ("Tsensor"): temp = line[1].split("=") temp = line[1].split(" ") tempinfo = temp[2] except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("CPU Temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("HDF Version:\tV%s") % getImageVersion( ) + " Build #" + getImageBuild() + " based on " + getOEVersion() + "\n" AboutText += _("Kernel (Box):\t%s") % about.getKernelVersionString( ) + " (" + getBoxType() + ")" + "\n" if path.isfile("/etc/issue"): version = open("/etc/issue").readlines()[-2].upper().strip()[:-6] if path.isfile("/etc/image-version"): build = self.searchString("/etc/image-version", "^build=") version = "%s #%s" % (version, build) AboutText += _("Image:\t%s") % version + "\n" imagestarted = "" bootname = '' if path.exists('/boot/bootname'): f = open('/boot/bootname', 'r') bootname = f.readline().split('=')[1] f.close() if SystemInfo["HasRootSubdir"]: image = find_rootfssubdir("STARTUP") AboutText += _("Selected Image:\t%s" ) % "STARTUP_" + image[-1:] + bootname + "\n" elif getMachineBuild() in ('gbmv200', 'cc1', 'sf8008', 'ustym4kpro', 'beyonwizv2', "viper4k"): if path.exists('/boot/STARTUP'): f = open('/boot/STARTUP', 'r') f.seek(5) image = f.read(4) if image == "emmc": image = "1" elif image == "usb0": f.seek(13) image = f.read(1) if image == "1": image = "2" elif image == "3": image = "3" elif image == "5": image = "4" elif image == "7": image = "5" f.close() if bootname: bootname = " (%s)" % bootname AboutText += _( "Partition:\t%s") % "STARTUP_" + image + bootname + "\n" else: f = open('/boot/STARTUP', 'r') f.seek(22) image = f.read(1) f.close() if bootname: bootname = " (%s)" % bootname AboutText += _( "Partition:\t%s") % "STARTUP_" + image + bootname + "\n" if SystemInfo["HaveMultiBoot"]: MyFlashDate = about.getFlashDateString() if path.isfile("/etc/filesystems"): AboutText += _("Flashed:\t%s") % MyFlashDate + "\n" #AboutText += _("Flashed:\tMultiboot active\n") else: AboutText += _("Flashed:\t%s\n") % about.getFlashDateString() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) gstcmd = 'opkg list-installed | grep "gstreamer1.0 -" | cut -c 16-32' gstcmd2 = os.system(gstcmd) #return (gstcmd2) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _( "GStreamer:\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Free Flash:\t%s\n") % freeflash() AboutText += _("Skin:\t%s (%s x %s)\n") % ( config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height()) AboutText += _("Last update:\t%s") % getEnigmaVersionString( ) + " to Build #" + getImageBuild() + "\n" AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Uptime") + ":\t" + about.getBoxUptime() + "\n" if SystemInfo["WakeOnLAN"]: if fileCheck("/proc/stb/power/wol"): WOLmode = open("/proc/stb/power/wol").read()[:-1] if fileCheck("/proc/stb/fp/wol"): WOLmode = open("/proc/stb/fp/wol").read()[:-1] AboutText += _("WakeOnLAN:\t%s\n") % WOLmode AboutText += _("Network:") eth0 = about.getIfConfig('eth0') eth1 = about.getIfConfig('eth1') ra0 = about.getIfConfig('ra0') wlan0 = about.getIfConfig('wlan0') wlan1 = about.getIfConfig('wlan1') if 'addr' in eth0: for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + str(x[0]) + ": " + str( x[1]) + " (" + netspeed() + ")\n" elif 'addr' in eth1: for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + str(x[0]) + ": " + str( x[1]) + " (" + netspeed_eth1() + ")\n" elif 'addr' in ra0: for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + str(x[0]) + ": " + str( x[1]) + " (~" + netspeed_ra0() + ")\n" elif 'addr' in wlan0: for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + str(x[0]) + ": " + str( x[1]) + " (~" + netspeed_wlan0() + ")\n" elif 'addr' in wlan1: for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + str(x[0]) + ": " + str( x[1]) + " (~" + netspeed_wlan1() + ")\n" else: for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + str(x[0]) + ": " + str(x[1]) + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor:\tVersion %s") % fp_version AboutText += fp_version + "\n" AboutLcdText = AboutText.replace('\t', ' ') self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): if isVTISkin: self["EnigmaVersion"] = StaticText(_("Version") + ": " + about.getEnigmaVersionString()) self["ImageVersion"] = StaticText(_("Image") + ": " + about.getImageVersionString()) self["TunerHeader"] = StaticText(_("Detected NIMs:")) fp_version = getFPVersion() if fp_version is None: fp_version = "" else: fp_version = _("Frontprocessor version: %s") % str(fp_version) self["FPVersion"] = StaticText(fp_version) nims = nimmanager.nimList() self.tuner_list = [] if len(nims) <= 4 : for count in (0, 1, 2, 3, 4, 5, 6, 7): if count < len(nims): self["Tuner" + str(count)] = StaticText(nims[count]) self.tuner_list.append((nims[count] + "\n")) else: self["Tuner" + str(count)] = StaticText("") else: desc_list = [] count = 0 cur_idx = -1 while count < len(nims): data = nims[count].split(":") idx = data[0].strip('Tuner').strip() desc = data[1].strip() if desc_list and desc_list[cur_idx]['desc'] == desc: desc_list[cur_idx]['end'] = idx else: desc_list.append({'desc' : desc, 'start' : idx, 'end' : idx}) cur_idx += 1 count += 1 for count in (0, 1, 2, 3, 4, 5, 6, 7): if count < len(desc_list): if desc_list[count]['start'] == desc_list[count]['end']: text = "Tuner %s: %s" % (desc_list[count]['start'], desc_list[count]['desc']) else: text = "Tuner %s-%s: %s" % (desc_list[count]['start'], desc_list[count]['end'], desc_list[count]['desc']) else: text = "" self["Tuner" + str(count)] = StaticText(text) if text != "": self.tuner_list.append(text + "\n") self["HDDHeader"] = StaticText(_("Detected HDD:")) hddlist = harddiskmanager.HDDList() hdd = hddlist and hddlist[0][1] or None if hdd is not None and hdd.model() != "": self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free())) else: self["hddA"] = StaticText(_("none")) self.enigma2_version = _("Version") + ": " + about.getEnigmaVersionString() self.image_version = _("Image") + ": " + about.getImageVersionString() cpu_info = parseLines("/proc/cpuinfo") cpu_name = "N/A" for line in cpu_info: if line.find('model') != -1: cpu_name = line.split(':') if len(cpu_name) >= 2: cpu_name = cpu_name[1].strip() break self.cpu = _("CPU") + ": " + cpu_name self.chipset = _("Chipset") + ": " + parseFile("/proc/stb/info/chipset") self.tuner_header = _("Detected NIMs:") self.hdd_header = _("Detected HDD:") self.hdd_list = [] if len(hddlist): for hddX in hddlist: hdd = hddX[1] if hdd.model() != "": self.hdd_list.append((hdd.model() + "\n %.2f GB - %.2f GB" % (hdd.diskSize()/1000.0, hdd.free()/1000.0) + " " + _("free") + "\n\n")) ifaces = iNetwork.getConfiguredAdapters() iface_list = [] for iface in ifaces: iface_list.append((_("Interface") + " : " + iNetwork.getAdapterName(iface) + " ("+ iNetwork.getFriendlyAdapterName(iface) + ")\n")) iface_list.append((_("IP") + " : " + parse_ipv4(iNetwork.getAdapterAttribute(iface, "ip")) + "\n")) iface_list.append((_("Netmask") + " : " + parse_ipv4(iNetwork.getAdapterAttribute(iface, "netmask")) + "\n")) iface_list.append((_("Gateway") + " : " + parse_ipv4(iNetwork.getAdapterAttribute(iface, "gateway")) + "\n")) if iNetwork.getAdapterAttribute(iface, "dhcp"): iface_list.append((_("DHCP") + " : " + _("Yes") + "\n")) else: iface_list.append((_("DHCP") + " : " + _("No") + "\n")) iface_list.append((_("MAC") + " : " + iNetwork.getAdapterAttribute(iface, "mac") + "\n")) iface_list.append(("\n")) my_txt = self.enigma2_version + "\n" my_txt += self.image_version + "\n" my_txt += "\n" my_txt += self.cpu + "\n" my_txt += self.chipset + "\n" my_txt += "\n" my_txt += self.tuner_header + "\n" for x in self.tuner_list: my_txt += " " + x my_txt += "\n" my_txt += _("Network") + ":\n" for x in iface_list: my_txt += " " + x my_txt += self.hdd_header + "\n" for x in self.hdd_list: my_txt += " " + x my_txt += "\n" self["FullAbout"] = ScrollLabel(my_txt) else: self["lab1"] = StaticText(_("openESI")) self["lab2"] = StaticText(_("By openESI Image Team")) self["lab3"] = StaticText(_("Support at") + " www.openesi.eu") model = None AboutText = getAboutText()[0] self["AboutScrollLabel"] = ScrollLabel(AboutText)
def __init__(self, session): Screen.__init__(self, session) if config.misc.boxtype.value == 'gb800solo': AboutText = _("Hardware: ") + " GigaBlue HD 800solo\n" elif config.misc.boxtype.value == 'gb800se': AboutText = _("Hardware: ") + " GigaBlue HD 800se\n" elif config.misc.boxtype.value == 'gb800ue': AboutText = _("Hardware: ") + " GigaBlue HD 800ue\n" elif config.misc.boxtype.value == 'gbquad': AboutText = _("Hardware: ") + " GigaBlue HD Quad\n" elif config.misc.boxtype.value == 'gbquadplus': AboutText = _("Hardware: ") + " GigaBlue HD Quad Plus\n" elif config.misc.boxtype.value == 'gb800seplus': AboutText = _("Hardware: ") + " GigaBlue HD 800se Plus\n" elif config.misc.boxtype.value == 'gb800ueplus': AboutText = _("Hardware: ") + " GigaBlue HD 800ue Plus\n" else: AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n" EnigmaVersion = "GUI Build: " + about.getEnigmaVersionString() self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + "\n" ImageVersion = _("Last upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" else: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" self["FPVersion"] = StaticText(fp_version) self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo self["AboutScrollLabel"] = ScrollLabel(AboutText) self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "green": self.showTranslationInfo, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown })
def getAboutText(): AboutText = "" AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n" cpuMHz = "" if getMachineBuild() in ('vusolo4k', 'hd51'): cpuMHz = " (1,5 GHz)" elif getMachineBuild() in ('hd52'): 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 AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("Version:\t%s") % getImageVersion() + "\n" AboutText += _("Build:\t%s") % getImageBuild() + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("Python:\t%s") % about.getPythonVersionString() + "\n" AboutText += _("Installed:\t%s") % about.getFlashDateString() + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\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() 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() 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
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 })
def getAboutText(): AboutText = "" AboutText += _("Model:\t\t%s %s\n") % (getMachineBrand(), getMachineName()) AboutText += _("OEM Model:\t\t%s\n") % getMachineBuild() 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 path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t\t%s") % about.getChipSetString() + "\n" cpuMHz = "" if getMachineBuild() in ('u41','u42','u43'): cpuMHz = _(" (1.0 GHz)") elif getMachineBuild() in ('dags72604','vusolo4k','vuultimo4k','vuzero4k','gb72604'): cpuMHz = _(" (1.5 GHz)") elif getMachineBuild() in ('formuler1tc','formuler1', 'triplex', 'tiviaraplus'): cpuMHz = _(" (1.3 GHz)") elif getMachineBuild() in ('gbmv200','u51','u5','u53','u532','u533','u52','u54','u55','u56','u5pvr','h9','h9combo','h10','cc1','sf8008','sf8008m','hd60','hd61','i55plus','ustym4kpro','beyonwizv2','viper4k','v8plus','multibox'): 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 ('vuduo4k',): cpuMHz = _(" (2.1 GHz)") elif getMachineBuild() in ('sf5008','et13000','et1x000','hd52','hd51','sf4008','vs1500','h7','osmio4k','osmio4kplus','osmini4k'): 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 AboutText += _("CPU:\t\t%s") % about.getCPUString() + cpuMHz + "\n" AboutText += _("Cores:\t\t%s") % about.getCpuCoresString() + "\n" imagestarted = "" bootname = '' if path.exists('/boot/bootname'): f = open('/boot/bootname', 'r') bootname = f.readline().split('=')[1] f.close() if SystemInfo["HasRootSubdir"]: image = find_rootfssubdir("STARTUP") AboutText += _("Selected Image:\t\t%s") % _("STARTUP_") + image[-1:] + bootname + "\n" elif getMachineBuild() in ('gbmv200','cc1','sf8008','sf8008m','ustym4kpro','beyonwizv2',"viper4k"): if path.exists('/boot/STARTUP'): f = open('/boot/STARTUP', 'r') f.seek(5) image = f.read(4) if image == "emmc": image = "1" elif image == "usb0": f.seek(13) image = f.read(1) if image == "1": image = "2" elif image == "3": image = "3" elif image == "5": image = "4" elif image == "7": image = "5" f.close() if bootname: bootname = " (%s)" %bootname AboutText += _("Selected Image:\t\t%s") % _("STARTUP_") + image + bootname + "\n" elif getMachineBuild() in ('osmio4k','osmio4kplus','osmini4k'): if path.exists('/boot/STARTUP'): f = open('/boot/STARTUP', 'r') f.seek(38) image = f.read(1) f.close() if bootname: bootname = " (%s)" %bootname AboutText += _("Selected Image:\t\t%s") % _("STARTUP_") + image + bootname + "\n" elif 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\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\t%s") % _("STARTUP_") + image + bootname + "\n" AboutText += _("Version:\t\t%s") % getImageVersion() + "\n" AboutText += _("Build:\t\t%s") % getImageBuild() + "\n" AboutText += _("Kernel:\t\t%s") % about.getKernelVersionString() + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t\t%s") % MyDateConverter(driversdate) + "\n" AboutText += _("GStreamer:\t\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("Python:\t\t%s") % about.getPythonVersionString() + "\n" MyFlashDate = about.getFlashDateString() if MyFlashDate != _("unknown"): AboutText += _("Installed:\t\t%s") % MyFlashDate + "\n" AboutText += _("Last update:\t\t%s") % MyDateConverter(getEnigmaVersionString()) + "\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() 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'): f = open('/proc/stb/power/avs', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: for line in open('/proc/hisi/msp/pm_cpu').readlines(): line = [x.strip() for x in line.strip().split(":")] if line[0] in ("Tsensor"): temp = line[1].split("=") temp = line[1].split(" ") tempinfo = temp[2] if getMachineBuild() in ('u41','u42','u43'): tempinfo = str(int(tempinfo) - 15) except: tempinfo = "" 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
def getInfo(): # TODO: get webif versione somewhere! info = {} brand = "Dream Multimedia" model = "unknown" chipset = "unknown" if fileExists("/proc/stb/info/boxtype"): brand = "Clarke-Xtrend" f = open("/proc/stb/info/boxtype", 'r') model = f.readline().strip() if model == "ini-3000" or model == "ini-5000" or model == "ini-7000": brand = "INI-Series" f.close() elif fileExists("/proc/stb/info/vumodel"): brand = "Vuplus" f = open("/proc/stb/info/vumodel", 'r') model = f.readline().strip() f.close() elif fileExists("/proc/stb/info/azmodel"): brand = "AZBOX" f = open("/proc/stb/info/model", 'r') model = f.readline().strip() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" else: f = open("/proc/stb/info/model", 'r') model = f.readline().strip() if model == "spark" or model == "spark7162": brand = "AMIKO" f.close() info['brand'] = brand info['model'] = model if fileExists("/proc/stb/info/chipset"): f = open("/proc/stb/info/chipset", 'r') chipset = f.readline().strip() f.close() info['chipset'] = chipset memFree = 0 for line in open("/proc/meminfo", 'r'): parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip() elif key in ("MemFree", "Buffers", "Cached"): memFree += int(parts[1].strip().split(' ', 1)[0]) info['mem2'] = "%s kB" % memFree try: f = open("/proc/uptime", "rb") uptime = int(float(f.readline().split(' ', 2)[0].strip())) f.close() uptimetext = '' if uptime > 86400: d = uptime / 86400 uptime = uptime % 86400 uptimetext += '%dd ' % d uptimetext += "%d:%.2d" % (uptime / 3600, (uptime % 3600) / 60) except: uptimetext = "?" info['uptime'] = uptimetext if fileExists("/etc/bhversion"): f = open("/etc/bhversion", 'r') imagever = f.readline().strip() f.close() elif fileExists("/etc/vtiversion.info"): f = open("/etc/vtiversion.info", 'r') imagever = f.readline().strip() f.close() else: imagever = about.getImageVersionString() info["webifver"] = getOpenWebifVer() info['imagever'] = imagever info['enigmaver'] = about.getEnigmaVersionString() info['kernelver'] = about.getKernelVersionString() try: from Tools.StbHardware import getFPVersion except ImportError: from Tools.DreamboxHardware import getFPVersion info['fp_version'] = getFPVersion() info['tuners'] = [] for i in range(0, nimmanager.getSlotCount()): info['tuners'].append({ "name": nimmanager.getNim(i).getSlotName(), "type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")" }) info['ifaces'] = [] ifaces = iNetwork.getConfiguredAdapters() for iface in ifaces: info['ifaces'].append({ "name": iNetwork.getAdapterName(iface), "mac": iNetwork.getAdapterAttribute(iface, "mac"), "dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"), "ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")), "mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")), "gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway")) }) info['hdd'] = [] for hdd in harddiskmanager.hdd: if hdd.free() <= 1024: free = "%i MB" % (hdd.free()) else: free = float(hdd.free()) / float(1024) free = "%.3f GB" % free info['hdd'].append({ "model": hdd.model(), "capacity": hdd.capacity(), "free": free }) return info
def __init__(self, session): Screen.__init__(self, session) AboutText = _('Hardware: ') + about.getHardwareTypeString() + '\n' AboutText += _('Image: ') + about.getImageTypeString() + '\n' AboutText += _('Kernel version: ') + about.getKernelVersionString() + '\n' EnigmaVersion = 'Enigma: ' + about.getEnigmaVersionString() self['EnigmaVersion'] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + '\n' ImageVersion = _('Last upgrade: ') + about.getImageVersionString() self['ImageVersion'] = StaticText(ImageVersion) AboutText += ImageVersion + '\n' 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}) return
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})
def populate(self): self["lab1"] = StaticText(_("openHDF by HDF Image Team")) self["lab2"] = StaticText(_("Support at") + " www.HDFreaks.cc") model = None AboutText = "" self["lab2"] = StaticText(_("Support @") + " www.hdfreaks.cc") AboutText += _("Model:\t%s %s - OEM Model: %s\n") % (getMachineBrand(), getMachineName(), getBrandOEM()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s") % about.getChipSetString() + "\n" 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 = "" 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() BootLoaderVersion = 0 try: if bootloader: AboutText += _("Bootloader:\t%s\n") % (bootloader) BootLoaderVersion = int(bootloader[1:]) except: BootLoaderVersion = 0 if getMachineBuild() in ('vusolo4k'): cpuMHz = " (1,5 GHz)" elif getMachineBuild() in ('vuuno4k','dm900','gb7252','dags7252'): cpuMHz = " (1,7 GHz)" elif getMachineBuild() in ('formuler1tc','formuler1','triplex'): cpuMHz = " (1,3 GHz)" elif getMachineBuild() in ('u5','u51','u52','u53','u5pvr','h9','sf8008'): cpuMHz = " (1,6 GHz)" elif getMachineBuild() in ('et1x000','hd52','hd51','sf4008','vs1500','h7','8100s'): 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 bogoMIPS = "" if res: cpuMHz = "" + res.replace("\n", "") + " MHz" if res2: bogoMIPS = "" + res2.replace("\n", "") if getMachineBuild() in ('vusolo4k','hd51','hd52','sf4008','dm900','h7','gb7252','8100s'): AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n" else: AboutText += _("CPU:\t%s") % about.getCPUString() + " " + cpuMHz + "\n" dMIPS = 0 if getMachineBuild() in ('vusolo4k'): dMIPS = "10.500" elif getMachineBuild() in ('hd52','hd51','sf4008','dm900','h7','gb7252','8100s'): dMIPS = "12.000" if getMachineBuild() in ('vusolo4k','hd51','hd52','sf4008','dm900','h7','gb7252','8100s'): AboutText += _("DMIPS:\t") + dMIPS + "\n" else: AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("HDF Version:\tV%s") % getImageVersion() + " Build #" + getImageBuild() + " based on " + getOEVersion() + "\n" AboutText += _("Kernel (Box):\t%s") % about.getKernelVersionString() + " (" + getBoxType() + ")" + "\n" imagestarted = "" bootname = '' if path.exists('/boot/bootname'): f = open('/boot/bootname', 'r') bootname = f.readline().split('=')[1] f.close() if getMachineBuild() in ('cc1','sf8008'): if path.exists('/boot/STARTUP'): f = open('/boot/STARTUP', 'r') f.seek(5) image = f.read(4) if image == "emmc": image = "1" elif image == "usb0": f.seek(13) image = f.read(1) if image == "1": image = "2" elif image == "3": image = "3" elif image == "5": image = "4" elif image == "7": image = "5" f.close() if bootname: bootname = " (%s)" %bootname AboutText += _("Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n" 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 += _("Image started:\t%s") % "STARTUP_" + image + bootname + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) gstcmd = 'opkg list-installed | grep "gstreamer1.0 -" | cut -c 16-32' gstcmd2 = os.system(gstcmd) #return (gstcmd2) AboutText += _("Drivers:\t%s") % driversdate + "\n" #AboutText += _("GStreamer:\t%s") % gstcmd2 + "\n" AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + " to Build #" + getImageBuild() + "\n" AboutText += _("Flashed:\t%s\n") % about.getFlashDateString() AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Network:") for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + x[0] + ": " + x[1] + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor:\tVersion %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() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): if getBoxType() in ('mutant51', 'ax51', 'zgemmah7', 'e4hdultra'): tempinfo = "" else: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System Temp:\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('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: for line in open('/proc/hisi/msp/pm_cpu').readlines(): line = [x.strip() for x in line.strip().split(":")] if line[0] in ("Tsensor"): temp = line[1].split("=") temp = line[1].split(" ") tempinfo = temp[2] except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("Processor Temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at") + " www.world-of-satellite.com") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if about.getChipSetString() != _("unavailable"): if SystemInfo["HasHiSi"]: AboutText += _("Chipset:\tHiSilicon %s\n" ) % about.getChipSetString().upper() elif about.getIsBroadcom(): AboutText += _("Chipset:\tBroadcom %s\n" ) % about.getChipSetString().upper() else: AboutText += _( "Chipset:\t%s\n") % about.getChipSetString().upper() AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString()) imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion( ), getImageBuild(), imageSubBuild, getImageType().title()) if SystemInfo["canMultiBoot"]: image = GetCurrentImage() bootmode = "" part = "" if SystemInfo["canMode12"]: bootmode = "bootmode = %s" % GetCurrentImageMode() if SystemInfo["HasHiSi"]: if image != 0: part = "%s%s" % (SystemInfo["canMultiBoot"][2], image * 2) image += 1 else: part = "MMC" image += 1 AboutText += _("Image Slot:\t%s") % "STARTUP_" + str( image) + " " + part + " " + bootmode + "\n" if getMachineName() in ('ET8500') and path.exists('/proc/mtd'): self.dualboot = self.dualBoot() if self.dualboot: AboutText += _("ET8500 Multiboot: Installed\n") skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer ", "") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _( " (%s x %s)") % (skinWidth, skinHeight) + "\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 temp:\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('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: for line in open('/proc/hisi/msp/pm_cpu').readlines(): line = [x.strip() for x in line.strip().split(":")] if line[0] in ("Tsensor"): temp = line[1].split("=") temp = line[1].split(" ") tempinfo = temp[2] except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" 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%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def getInfo(): # TODO: get webif versione somewhere! info = {} brand = "Dream Multimedia" model = "unknown" chipset = "unknown" if fileExists("/proc/stb/info/hwmodel"): brand = "4D" f = open("/proc/stb/info/hwmodel",'r') model = f.readline().strip() f.close() elif fileExists("/proc/stb/info/azmodel"): brand = "AZBOX" f = open("/proc/stb/info/model",'r') model = f.readline().strip() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" else: f = open("/proc/stb/info/model",'r') model = f.readline().strip() f.close() info['brand'] = brand info['model'] = model if fileExists("/proc/stb/info/chipset"): f = open("/proc/stb/info/chipset",'r') chipset = f.readline().strip() f.close() info['chipset'] = chipset memFree = 0 for line in open("/proc/meminfo",'r'): parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip() elif key in ("MemFree", "Buffers", "Cached"): memFree += int(parts[1].strip().split(' ',1)[0]) info['mem2'] = "%s kB" % memFree try: f = open("/proc/uptime", "rb") uptime = int(float(f.readline().split(' ', 2)[0].strip())) f.close() uptimetext = '' if uptime > 86400: d = uptime/86400 uptime = uptime % 86400 uptimetext += '%dd ' % d uptimetext += "%d:%.2d" % (uptime/3600, (uptime%3600)/60) except: uptimetext = "?" info['uptime'] = uptimetext if fileExists("/etc/bhversion"): f = open("/etc/bhversion",'r') imagever = f.readline().strip() f.close() elif fileExists("/etc/vtiversion.info"): f = open("/etc/vtiversion.info",'r') imagever = f.readline().strip() f.close() else: imagever = about.getImageVersionString() info["webifver"] = getOpenWebifVer() info['imagever'] = imagever info['enigmaver'] = about.getEnigmaVersionString() info['kernelver'] = about.getKernelVersionString() try: from Tools.StbHardware import getFPVersion except ImportError: from Tools.DreamboxHardware import getFPVersion info['fp_version'] = getFPVersion() info['tuners'] = [] for i in range(0, nimmanager.getSlotCount()): info['tuners'].append({ "name": nimmanager.getNim(i).getSlotName(), "type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")" }) info['ifaces'] = [] ifaces = iNetwork.getConfiguredAdapters() for iface in ifaces: info['ifaces'].append({ "name": iNetwork.getAdapterName(iface), "mac": iNetwork.getAdapterAttribute(iface, "mac"), "dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"), "ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")), "mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")), "gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway")) }) info['hdd'] = [] for hdd in harddiskmanager.hdd: if hdd.free() <= 1024: free = "%i MB" % (hdd.free()) else: free = float(hdd.free()) / float(1024) free = "%.3f GB" % free info['hdd'].append({ "model": hdd.model(), "capacity": hdd.capacity(), "free": free }) return info
def populate(self): self["lab1"] = StaticText(_("openHDF by HDF Image Team")) self["lab2"] = StaticText(_("Support at") + " www.HDFreaks.cc") model = None AboutText = "" self["lab2"] = StaticText(_("Support @") + " www.hdfreaks.cc") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) #AboutText += _("Boxtype:\t%s\n") % getBoxType() if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s") % about.getChipSetString() + "\n" 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 = "" 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() BootLoaderVersion = 0 try: if bootloader: AboutText += _("Bootloader:\t%s\n") % (bootloader) BootLoaderVersion = int(bootloader[1:]) except: BootLoaderVersion = 0 if getMachineBuild() in ('vusolo4k'): cpuMHz = "1,5 GHz" elif getMachineBuild() in ('hd52', 'hd51', 'sf4008'): 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 bogoMIPS = "" if res: cpuMHz = "" + res.replace("\n", "") + " MHz" if res2: bogoMIPS = "" + res2.replace("\n", "") if getMachineBuild() in ('vusolo4k', 'hd51', 'hd52', 'sf4008'): AboutText += _( "CPU:\t") + "ARM Dual core " + " (" + cpuMHz + ")" + "\n" else: AboutText += _( "CPU:\t%s") % about.getCPUString() + " (" + cpuMHz + ")" + "\n" dMIPS = 0 if getMachineBuild() in ('vusolo4k'): dMIPS = "10.500" elif getMachineBuild() in ('hd52', 'hd51', 'sf4008'): dMIPS = "12.000" if getMachineBuild() in ('vusolo4k', 'hd51', 'hd52', 'sf4008'): AboutText += _("DMIPS:\t") + dMIPS + "\n" else: AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("HDF Version:\tV%s") % getImageVersion( ) + " - Build # " + getImageBuild() + "\n" AboutText += _("Kernel (Box):\t%s") % about.getKernelVersionString( ) + " (" + getBoxType() + ")" + "\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 += _( "Image started:\t%s") % "STARTUP_" + image + bootname + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _( "GStreamer:\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n" AboutText += _("Flashed:\t%s\n") % about.getFlashDateString() AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Network:") for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + x[0] + ": " + x[1] + "\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() 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 Temp:\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 += _("CPU Temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') self["AboutScrollLabel"] = ScrollLabel(AboutText)
def populate(self): model = None AboutText = "" AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n" cpuMHz = "" 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 AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("Version:\t%s") % getImageVersion() + "\n" AboutText += _("Front Panel:\t%s") % getMicomVersion() + "\n" #AboutText += _("Build:\t%s") % getImageBuild() + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" AboutText += _("Drivers:\t%s") % about.getDriverBuildDateString() + "\n" AboutText += _("Bootloader:\t%s") % self.loader + "\n" AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\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', '') + 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', '') + mark + "C\n" self["AboutScrollLabel"].setText(AboutText)
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 })
def getAboutText(): AboutText = '' AboutText += _('Model:\t\t%s %s\n') % (getMachineBrand(), getMachineName()) AboutText += _('OEM Model:\t\t%s\n') % getMachineBuild() 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 path.exists('/proc/stb/info/chipset'): AboutText += _('Chipset:\t\t%s') % about.getChipSetString() + '\n' cpuMHz = '' if getMachineBuild() in ('u41', 'u42', 'u43'): cpuMHz = _(' (1.0 GHz)') elif getMachineBuild() in ('dags72604', 'vusolo4k', 'vuultimo4k', 'vuzero4k', 'gb72604'): cpuMHz = _(' (1.5 GHz)') elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex', 'tiviaraplus'): cpuMHz = _(' (1.3 GHz)') elif getMachineBuild() in ('gbmv200', 'u51', 'u5', 'u53', 'u532', 'u533', 'u52', 'u54', 'u55', 'u56', 'u5pvr', 'h9', 'h9combo', 'h10', 'cc1', 'sf8008', 'sf8008m', 'hd60', 'hd61', 'i55plus', 'ustym4kpro', 'beyonwizv2', 'viper4k', 'v8plus', 'multibox'): 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 ('vuduo4k', ): cpuMHz = _(' (2.1 GHz)') elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51', 'sf4008', 'vs1500', 'h7', 'osmio4k', 'osmio4kplus', 'osmini4k'): 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)') elif 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 = ' (' + str(int(float(lisp[1].replace( '\n', '')))) + ' MHz)' break except: pass AboutText += _('CPU:\t\t%s') % about.getCPUString() + cpuMHz + '\n' AboutText += _('Cores:\t\t%s') % about.getCpuCoresString() + '\n' imagestarted = '' bootname = '' if path.exists('/boot/bootname'): f = open('/boot/bootname', 'r') bootname = f.readline().split('=')[1] f.close() if SystemInfo['canMultiBoot']: slot = image = GetCurrentImage() bootmode = '' part = _('eMMC slot %s') % slot if SystemInfo['canMode12']: bootmode = _('bootmode = %s') % GetCurrentImageMode() if SystemInfo['HasHiSi'] and 'sda' in SystemInfo['canMultiBoot'][slot][ 'device']: if slot > 4: image -= 4 else: image -= 1 part = 'SDcard slot %s (%s) ' % ( image, SystemInfo['canMultiBoot'][slot]['device']) AboutText += _('Selected Image:\t\t%s') % _('STARTUP_') + str( slot) + ' ' + part + ' ' + bootmode + '\n' AboutText += _('Version:\t\t%s') % getImageVersion() + '\n' AboutText += _('Build:\t\t%s') % getImageBuild() + '\n' AboutText += _('Kernel:\t\t%s') % about.getKernelVersionString() + '\n' string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _('Drivers:\t\t%s') % MyDateConverter(driversdate) + '\n' AboutText += _( 'GStreamer:\t\t%s') % about.getGStreamerVersionString() + '\n' AboutText += _('Python:\t\t%s') % about.getPythonVersionString() + '\n' MyFlashDate = about.getFlashDateString() if MyFlashDate != _('unknown'): AboutText += _('Installed:\t\t%s') % MyFlashDate + '\n' AboutText += _('Last update:\t\t%s') % MyDateConverter( getEnigmaVersionString()) + '\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() 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'): f = open('/proc/stb/power/avs', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = '' elif path.exists('/proc/hisi/msp/pm_cpu'): try: for line in open('/proc/hisi/msp/pm_cpu').readlines(): line = [x.strip() for x in line.strip().split(':')] if line[0] in 'Tsensor': temp = line[1].split('=') temp = line[1].split(' ') tempinfo = temp[2] if getMachineBuild() in ('u41', 'u42', 'u43'): tempinfo = str(int(tempinfo) - 15) except: tempinfo = '' 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)
def getRcFolder(self): remotefolder = 'dmm0' if os.path.exists('/proc/stb/info/azmodel'): f = open("/proc/stb/info/model",'r') model = f.readline().strip() f.close() if model == "premium" or model == "premium+": remotefolder = 'azboxhd' elif model == "elite" or model == "ultra": remotefolder = 'azboxelite' elif model == "me" or model == "minime": remotefolder = 'azboxme' elif getMachineBrand() == 'EVO': remotefolder = 'evo' elif getMachineBrand() == 'VisionNet': remotefolder = 'visionnet' elif getBoxType() in ('gbquad', 'gb800se', 'gb800ue', 'gb800solo', 'gb800seplus', 'gb800ueplus', 'gbipbox'): remotefolder = 'gb0' elif getBoxType() == 'gbquadplus': remotefolder = 'gb1' elif getBoxType() in ('mutant1100'): remotefolder = 'hd1100' elif getBoxType() in ('mutant2400', 'quadbox2400'): remotefolder = 'hd2400' elif getMachineBrand() == 'Jepssen': remotefolder = 'mediabox' elif getBoxType() in ('iqonios100hd', 'iqonios200hd', 'iqonios300hd', 'roxxs200hd', 'mediaart200hd'): remotefolder = 'iqon1' elif getBoxType() in ('force1', 'force1plus', 'worldvisionf1', 'worldvisionf1plus'): remotefolder = 'iqon2' elif getBoxType() in ('formuler1', 'formuler3'): remotefolder = 'formuler1' elif getBoxType() == 'dm8000': remotefolder = 'dmm0' elif getBoxType() in ('dm800', 'dm800se', 'dm500hd'): remotefolder = 'dmm1' elif getBoxType() in ('dm7020hd', 'dm7020hdv2', 'dm800sev2', 'dm500hdv2'): remotefolder = 'dmm2' elif getBoxType() in ('tmtwin', 'tm2t'): remotefolder = 'tm1' elif getBoxType() in ('tmsingle', 'tmnano', 'tmnano2t', 'tmnano3t', 'tmnano2super'): remotefolder = 'tm2' elif getBoxType() == 'uniboxhd1': fp_version = str(getFPVersion()) if fp_version.startswith('1'): remotefolder = 'ini0' else: remotefolder = 'ini2' elif getBoxType() in ('uniboxhd2', 'uniboxhd3'): remotefolder = 'ini1' elif getBoxType() == 'uniboxhde': remotefolder = 'uniboxhde' elif getBoxType() in ('sezam1000hd', 'sezam5000hd'): remotefolder = 'ini2' elif getMachineBrand() == 'Miraclebox': remotefolder = 'ini3' elif getMachineBrand() in ('GI', 'Atemio') or getBoxType() in ('sezammarvel'): remotefolder = 'ini4' elif getBoxType() == 'beyonwizt3': remotefolder = 'ini5' elif getBoxType() in ('optimussos1', 'optimussos2', 'optimussos1plus', 'optimussos2plus'): remotefolder = 'optimuss1' elif getBoxType() in ('optimussos3plus'): remotefolder = 'optimuss2' elif getBoxType() == 'sogno8800hd': remotefolder = 'sogno' elif getBoxType() in ('et4x00'): remotefolder = 'et4x00' elif getBoxType() in ('et6x00', 'et6000', 'et5x00', 'et5000'): remotefolder = 'et6x00' elif getBoxType() == 'et6500': remotefolder = 'et6500' elif getBoxType() in ('et8000', 'et10000'): remotefolder = 'et8000' elif getBoxType() in ('et9000', 'et9x00', 'et9200'): remotefolder = 'et9x00' elif getBoxType() in ('et9500'): remotefolder = 'et9500' elif getBoxType() in ('et7000', 'et7500'): remotefolder = 'et7x00' elif getBoxType() in ('vusolo', 'vusolo2', 'vusolose', 'vuduo', 'vuuno'): remotefolder = 'vu' elif getBoxType() == 'vuultimo': remotefolder = 'vu2' elif getBoxType() == 'vuduo2': remotefolder = 'vu3' elif getBoxType() in ('starsatlx', 'axodin', 'axodinc', 'odinm6'): remotefolder = 'odinm6' elif getBoxType() in ('ixussone'): remotefolder = 'ixussone' elif getBoxType() in ('ixusszero'): emotefolder = 'ixusszero' elif getMachineBuild() == 'cube': remotefolder = 'cube' elif getMachineBuild().startswith('ebox'): remotefolder = 'ebox5000' elif getMachineBuild() == 'e3hd': remotefolder = 'e3hd' elif getMachineBuild() == 'odinm7': remotefolder = 'odinm7' elif getMachineBuild() == 'odinm9': remotefolder = 'odinm9' elif getMachineBuild() == 'xp1000': remotefolder = 'xp1000' elif getBrandOEM() == 'fulan': remotefolder = 'fulan' return remotefolder
def getAboutText(): AboutText = "" AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n" cpuMHz = "" 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 AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("Version:\t%s") % 'SpecialEdition' + "\n" AboutText += _("Moderator:\t%s") % 'Sodo' + "\n" AboutText += _("Build:\t%s") % '3.0' + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n" AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\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
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'] = getMachineBrand() info['model'] = getMachineName() info['boxtype'] = getBoxType() info['machinebuild'] = getMachineBuild() try: # temporary due OE-A info['lcd'] = getLcd() except: # nosec # noqa: E722 info['lcd'] = 0 try: # temporary due OE-A info['grabpip'] = getGrabPip() except: # nosec # noqa: E722 info['grabpip'] = 0 chipset = "unknown" if fileExists("/etc/.box"): f = open("/etc/.box", 'r') model = f.readline().strip().lower() f.close() if model.startswith("ufs") or model.startswith("ufc"): if model in ("ufs910", "ufs922", "ufc960"): chipset = "SH4 @266MHz" else: chipset = "SH4 @450MHz" elif model in ("topf", "tf7700hdpvr"): chipset = "SH4 @266MHz" elif model.startswith("azbox"): f = open("/proc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif model.startswith("spark"): if model == "spark7162": chipset = "SH4 @540MHz" else: chipset = "SH4 @450MHz" elif fileExists("/proc/stb/info/azmodel"): f = open("/proc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif fileExists("/proc/stb/info/model"): f = open("/proc/stb/info/model", 'r') model = f.readline().strip().lower() f.close() if model == "tf7700hdpvr": chipset = "SH4 @266MHz" elif model == "nbox": chipset = "STi7100 @266MHz" elif model == "arivalink200": chipset = "STi7109 @266MHz" elif model in ("adb2850", "adb2849", "dsi87"): chipset = "STi7111 @450MHz" elif model in ("sagemcom88", "esi88"): chipset = "STi7105 @450MHz" elif model.startswith("spark"): if model == "spark7162": chipset = "STi7162 @540MHz" else: chipset = "STi7111 @450MHz" elif model == "dm800": chipset = "bcm7401" elif model in ("dm800se", "dm500hd", "dm7020hd", "dm800sev2", "dm500hdv2", "dm7020hdv2"): chipset = "bcm7405" elif model == "dm8000": chipset = "bcm7400" elif model in ("dm820", "dm7080"): chipset = "bcm7435" elif model in ("dm520", "dm525"): chipset = "bcm73625" elif model in ("dm900", "dm920"): chipset = "bcm7252S" if fileExists("/proc/stb/info/chipset"): f = open("/proc/stb/info/chipset", 'r') chipset = f.readline().strip() f.close() info['chipset'] = chipset memFree = 0 for line in open("/proc/meminfo", 'r'): parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip().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']) try: f = open("/proc/uptime", "r") uptime = int(float(f.readline().split(' ', 2)[0].strip())) f.close() uptimetext = '' if uptime > 86400: d = uptime / 86400 uptime = uptime % 86400 uptimetext += '%dd ' % d uptimetext += "%d:%.2d" % (uptime / 3600, (uptime % 3600) / 60) except: # nosec # noqa: E722 uptimetext = "?" info['uptime'] = uptimetext info["webifver"] = OPENWEBIFVER info['imagedistro'] = getImageDistro() info['friendlyimagedistro'] = getFriendlyImageDistro() info['oever'] = getOEVersion() info['imagever'] = getImageVersion() ib = getImageBuild() if ib: info['imagever'] = info['imagever'] + "." + ib info['enigmaver'] = getEnigmaVersionString() info['driverdate'] = getDriverDate() info['kernelver'] = about.getKernelVersionString() try: from Tools.StbHardware import getFPVersion except ImportError: from Tools.DreamboxHardware import getFPVersion try: info['fp_version'] = getFPVersion() except: # nosec # noqa: E722 info['fp_version'] = None friendlychipsetdescription = _("Chipset") friendlychipsettext = info['chipset'].replace("bcm", "Broadcom ") if friendlychipsettext in ("7335", "7356", "7362", "73625", "7424", "7425", "7429"): friendlychipsettext = "Broadcom " + friendlychipsettext if not (info['fp_version'] is None or info['fp_version'] == 0): friendlychipsetdescription = friendlychipsetdescription + " (" + _( "Front processor version") + ")" friendlychipsettext = friendlychipsettext + " (" + str( info['fp_version']) + ")" info['friendlychipsetdescription'] = friendlychipsetdescription info['friendlychipsettext'] = friendlychipsettext 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: # nosec # 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['transcoding'] = TRANSCODING info['EX'] = '' if session: try: # gets all current stream clients for images using eStreamServer # TODO: get tuner info for streams # TODO: get recoding/timer info if more than one info['streams'] = GetStreamInfo() recs = NavigationInstance.instance.getRecordings() if recs: # only one stream s_name = '' if len(info['streams']) == 1: sinfo = info['streams'][0] s_name = sinfo["name"] + ' (' + sinfo["ip"] + ')' print("[OpenWebif] -D- s_name '%s'" % s_name) 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(ServiceReference("1:0:1:0:0:0:0:0:0:0"), 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
def __init__(self, session): Screen.__init__(self, session) try: f = open("/etc/bpversion", "r") name = f.readline().strip() f.close() except: name = "Black Pole" AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Kernel Version: ") + about.getKernelVersionString() + "\n" EnigmaVersion = "Firmware: " + name self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + "\n" ImageVersion = "Team Homesite: vuplus-community.net" self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" else: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" self["FPVersion"] = StaticText(fp_version) self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free() / 1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo self["AboutScrollLabel"] = ScrollLabel(AboutText) self["actions"] = ActionMap( ["SetupActions", "ColorActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "green": self.showTranslationInfo, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown, }, )
def populate(self): self["lab1"] = StaticText(_("Virtuosso Image Xtreme")) self["lab2"] = StaticText(_("By Team ViX")) model = None AboutText = "" if getBoxType() == 'vuuno': self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk") model = "Vu+ Uno" elif getBoxType() == 'vuultimo': self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk") model = "Vu+ Ultimo" elif getBoxType() == 'vusolo': self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk") model = "Vu+ Solo\n" elif getBoxType() == 'vusolo2': self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk") model = "Vu+ Solo" + chr(178) elif getBoxType() == 'vuduo': self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk") model = "Vu+ Duo" elif getBoxType() == 'vuduo2': self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk") model = "Vu+ Duo" + chr(178) elif getBoxType() == 'et5x00': self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk") model = "Xtrend ET5x00 Series" elif getBoxType() == 'et6x00': self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk") model = "Xtrend ET6x00 Series" elif getBoxType() == 'et9x00': self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk") model = "Xtrend ET9x00 Series" elif getBoxType() == 'odinm9': self["lab3"] = StaticText(_("Support at") + " www.odin-support.co.uk") model = "Odin M9" elif getBoxType() == 'gb800solo': self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk") model = "GigaBlue HD 800 Solo" elif getBoxType() == 'gb800se': self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk") model = "GigaBlue HD 800SE" elif getBoxType() == 'gb800ue': self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk") model = "GigaBlue HD 800UE" elif getBoxType() == 'gbquad': self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk") model = "GigaBlue HD Quad" elif getBoxType() == 'ventonhdx': self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk") model = "Venton Unibox HDx" elif getBoxType() == 'ixussone': self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk") model = "Ixuss One" else: self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk") model = getBoxType() if model: AboutText += _("Model: %s") % model + "\n" if path.exists('/proc/stb/info/chipset'): chipset = open('/proc/stb/info/chipset', 'r').read() AboutText += _("Chipset: BCM%s") % chipset.replace('\n','') + "\n" AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n" AboutText += _("Drivers: %s") % about.getDriversString() + "\n" # self["ImageType"] = StaticText(_("Image:") + " " + about.getImageTypeString()) # AboutText += _("Image: %s") % about.getImageTypeString() + "\n" AboutText += _("Version: %s") % about.getImageVersionString() + "\n" AboutText += _("Build: %s") % about.getBuildVersionString() + "\n" AboutText += _("Last update: %s") % about.getLastUpdateString() + "\n\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): tempinfo = open('/proc/stb/sensors/temp0/value', 'r').read() elif path.exists('/proc/stb/fp/temp_sensor'): tempinfo = open('/proc/stb/fp/temp_sensor', 'r').read() if tempinfo and int(tempinfo.replace('\n','')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature: %s") % tempinfo.replace('\n','') + mark + "C\n\n" AboutText += _("Translation:") + "\n" # don't remove the string out of the _(), or it can't be "translated" anymore. # TRANSLATORS: Add here whatever should be shown in the "translator" about screen, up to 6 lines (use \n for newline) info = _("TRANSLATOR_INFO") if info == _("TRANSLATOR_INFO"): info = "" infolines = _("").split("\n") infomap = {} for x in infolines: l = x.split(': ') if len(l) != 2: continue (type, value) = l infomap[type] = value translator_name = infomap.get("Language-Team", "none") if translator_name == "none": translator_name = infomap.get("Last-Translator", "") AboutText += translator_name + "\n\n" AboutText += info self["AboutScrollLabel"] = ScrollLabel(AboutText)
def getInfo(): # TODO: get webif versione somewhere! info = {} info['brand'] = getMachineBrand() info['model'] = getMachineName() info['boxtype'] = getBoxType() info['machinebuild'] = getMachineBuild() chipset = "unknown" if fileExists("/etc/.box"): f = open("/etc/.box",'r') model = f.readline().strip().lower() f.close() if model.startswith("ufs") or model.startswith("ufc"): if model in ("ufs910", "ufs922", "ufc960"): chipset = "SH4 @266MHz" else: chipset = "SH4 @450MHz" elif model in ("topf", "tf7700hdpvr"): chipset = "SH4 @266MHz" elif model.startswith("azbox"): f = open("/proc/stb/info/model",'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif model.startswith("spark"): if model == "spark7162": chipset = "SH4 @540MHz" else: chipset = "SH4 @450MHz" elif fileExists("/proc/stb/info/azmodel"): f = open("/proc/stb/info/model",'r') model = f.readline().strip().lower() f.close() if model == "me": chipset = "SIGMA 8655" elif model == "minime": chipset = "SIGMA 8653" else: chipset = "SIGMA 8634" elif fileExists("/proc/stb/info/model"): f = open("/proc/stb/info/model",'r') model = f.readline().strip().lower() f.close() if model == "tf7700hdpvr": chipset = "SH4 @266MHz" elif model == "nbox": chipset = "STi7100 @266MHz" elif model == "arivalink200": chipset = "STi7109 @266MHz" elif model in ("adb2850", "adb2849", "dsi87"): chipset = "STi7111 @450MHz" elif model in ("sagemcom88", "esi88"): chipset = "STi7105 @450MHz" elif model.startswith("spark"): if model == "spark7162": chipset = "STi7162 @540MHz" else: chipset = "STi7111 @450MHz" if fileExists("/proc/stb/info/chipset"): f = open("/proc/stb/info/chipset",'r') chipset = f.readline().strip() f.close() info['chipset'] = chipset memFree = 0 for line in open("/proc/meminfo",'r'): parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip() elif key in ("MemFree", "Buffers", "Cached"): memFree += int(parts[1].strip().split(' ',1)[0]) info['mem2'] = "%s kB" % memFree try: f = open("/proc/uptime", "rb") uptime = int(float(f.readline().split(' ', 2)[0].strip())) f.close() uptimetext = '' if uptime > 86400: d = uptime/86400 uptime = uptime % 86400 uptimetext += '%dd ' % d uptimetext += "%d:%.2d" % (uptime/3600, (uptime%3600)/60) except: uptimetext = "?" info['uptime'] = uptimetext info["webifver"] = getOpenWebifVer() info['imagedistro'] = getImageDistro() info['oever'] = getOEVersion() info['imagever'] = getImageVersion() + '.' + getImageBuild() info['enigmaver'] = getEnigmaVersionString() info['driverdate'] = getDriverDate() info['kernelver'] = about.getKernelVersionString() try: from Tools.StbHardware import getFPVersion except ImportError: from Tools.DreamboxHardware import getFPVersion info['fp_version'] = getFPVersion() info['tuners'] = [] for i in range(0, nimmanager.getSlotCount()): info['tuners'].append({ "name": nimmanager.getNim(i).getSlotName(), "type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")" }) info['ifaces'] = [] ifaces = iNetwork.getConfiguredAdapters() for iface in ifaces: info['ifaces'].append({ "name": iNetwork.getAdapterName(iface), "mac": iNetwork.getAdapterAttribute(iface, "mac"), "dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"), "ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")), "mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")), "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'], "firstpublic": getAdapterIPv6(iface)['firstpublic'] }) info['hdd'] = [] for hdd in harddiskmanager.hdd: dev = hdd.findMount() if dev: stat = os.statvfs(dev) free = int((stat.f_bfree/1024) * (stat.f_bsize/1024)) else: free = -1 if free <= 1024: free = "%i MB" % free else: free = free / 1024. free = "%.3f GB" % free size = hdd.diskSize() * 1000000 / 1048576. if size > 1048576: size = "%.2f TB" % (size / 1048576.) elif size > 1024: size = "%.1f GB" % (size / 1024.) else: size = "%d MB" % size 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 TB" % iecsize else: iecsize = "%d TB" % iecsize # Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB elif iecsize > 300000: iecsize = "%d GB" % ((iecsize + 5000) // 10000 * 10) # ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB elif iecsize > 1000: iecsize = "%d GB" % ((iecsize + 500) // 1000) else: iecsize = "%d MB" % iecsize info['hdd'].append({ "model": hdd.model(), "capacity": size, "labelled_capacity": iecsize, "free": free }) info['transcoding'] = False if (info['model'] in ("Solo4K", "Solo²", "Duo²", "Solo SE", "Quad", "Quad Plus") or info['machinebuild'] in ('inihdp', 'hd2400', 'et10000', 'xpeedlx3', 'ew7356', 'dags3', 'dags4')): if os.path.exists(eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/TransCodingSetup/plugin.pyo')) or os.path.exists(eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/TranscodingSetup/plugin.pyo')) or os.path.exists(eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/MultiTransCodingSetup/plugin.pyo')): info['transcoding'] = True info['kinopoisk'] = False lang = ['ru', 'uk', 'lv', 'lt', 'et'] for l in lang: if l in language.getLanguage(): info['kinopoisk'] = True global STATICBOXINFO STATICBOXINFO = info return info
def populate(self): self["lab1"] = StaticText(_("openHDF by HDF Image Team")) self["lab2"] = StaticText(_("Support at") + " www.HDFreaks.cc") model = None AboutText = "" self["lab2"] = StaticText(_("Support @") + " www.hdfreaks.cc") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\tBCM%s") % about.getChipSetString() + "\n" 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 = "" + res.replace("\n", "") + " MHz" if res2: bogoMIPS = "" + res2.replace("\n", "") AboutText += _("CPU:\t%s") % about.getCPUString() + "\n" AboutText += _("Clock Speed:\t%s") % cpuMHz + "\n" AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("HDF Version:\t%s") % getImageVersion() + "\n" AboutText += _("HDF Build:\t%s") % getImageBuild() + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n" AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\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 Temp:\t%s") % tempinfo.replace('\n', '') + 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 Temp:\t%s") % tempinfo.replace('\n', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') self["AboutScrollLabel"] = ScrollLabel(AboutText)
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 path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n" cpuMHz = "" if getMachineBuild() in ('vusolo4k'): cpuMHz = " (1,5 GHz)" elif getMachineBuild() in ('hd52','hd51'): 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 AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n" AboutText += _("Cores:\t%s") % 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" AboutText += _("Version:\t%s") % getImageVersion() + "\n" AboutText += _("Build:\t%s") % getImageBuild() + "\n" AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("Python:\t%s") % about.getPythonVersionString() + "\n" AboutText += _("Installed:\t%s") % about.getFlashDateString() + "\n" AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\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() 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() 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
def getAboutText(): AboutText = '' AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName()) if path.exists('/proc/stb/info/chipset'): AboutText += _('Chipset:\t%s') % about.getChipSetString() + '\n' cpuMHz = '' if getBoxType() in 'vusolo4k': cpuMHz = ' (1,5 GHz)' elif 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 = ' (' + str(int(float(lisp[1].replace('\n', '')))) + ' MHz)' break except: pass AboutText += _('CPU:\t%s') % about.getCPUString() + cpuMHz + '\n' AboutText += _('Cores:\t%s') % about.getCpuCoresString() + '\n' AboutText += _('Version:\t%s') % getImageVersion() + '\n' AboutText += _('Build:\t%s') % getImageBuild() + '\n' AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n' string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _('Drivers:\t%s') % driversdate + '\n' AboutText += _('GStreamer:\t%s') % about.getGStreamerVersionString() + '\n' AboutText += _('Python:\t%s') % about.getPythonVersionString() + '\n' AboutText += _('Skin name:\t%s\n') % config.skin.primary_skin.value[0:-9] AboutText += _('Installed:\t%s') % about.getFlashDateString() + '\n' AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\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)
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 })
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 })
def __init__(self, session): Screen.__init__(self, session) # [ IQON : by knuth model = HardwareInfo().get_device_name() macaddress = about.getMacAddressString("eth0") if model in ("force2solid"): AboutText = _("BRAND: ") + "IQON" + "\n" AboutText += _("Hardware: ") + "FORCE2" + "\n" elif model in ("tmnanose"): AboutText = _("Hardware: ") + "TM-NANO-SE" + "\n" elif model in ("optimussosplus"): AboutText = _("Hardware: ") + "OPTIMUSS OS+" + "\n" elif model in ("force2plus"): AboutText = _("Hardware: ") + "FORCE2+" + "\n" elif model in ("tmnanosecombo"): AboutText = _("Hardware: ") + "TM-NANO-SE Combo" + "\n" elif model in ("tmnanosem2"): AboutText = _("Hardware: ") + "TM-NANO-SE M2" + "\n" elif model in ("optimussos2"): AboutText = _("Hardware: ") + "OPTIMUSS OS2" + "\n" elif model in ("optimussos1"): AboutText = _("Hardware: ") + "OPTIMUSS OS1" + "\n" elif model in ("optimussos2plus"): AboutText = _("Hardware: ") + "OPTIMUSS OS2+" + "\n" elif model in ("optimussos1plus"): AboutText = _("Hardware: ") + "OPTIMUSS OS1+" + "\n" elif model in ("force2eco"): AboutText = _("Hardware: ") + "FORCE2 Eco" + "\n" elif model in ("fusionhd"): AboutText = _("Hardware: ") + "FUSION HD" + "\n" elif model in ("force1plus"): f = open("/etc/.brandtype", 'r') line = f.readline() if "technomate" in line: AboutText = _("Hardware: ") + "TM-NANO-3T COMBO" + "\n" elif "edision" in line: AboutText = _("Hardware: ") + "OPTIMUSS OS3+" + "\n" elif "iqon" in line: AboutText = _("BRAND: ") + "IQON" + "\n" AboutText += _("Hardware: ") + about.getHardwareTypeString() + "\n" else: AboutText = _("Hardware: ") + about.getHardwareModelString() + "\n" f.close() else: AboutText = _("Hardware: ") + about.getHardwareModelString() + "\n" AboutText += _("Mac Address: ") + macaddress + "\n" if HardwareInfo().has_micom(): AboutText += _("Micom Version: ") + about.getMicomVersionString() + "\n" # AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n" EnigmaVersion = "Enigma: " + about.getEnigmaVersionString() self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + "\n" ImageVersion = _("Last upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" else: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" # if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset: BCM%s\n") % about.getChipSetString() AboutText += _("CPU: %s\n") % about.getCPUString() AboutText += _("CPU Speed: %s\n") % about.getCPUSpeedString() AboutText += _("Cores: %s\n") % about.getCpuCoresString() self["FPVersion"] = StaticText(fp_version) self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo self["AboutScrollLabel"] = ScrollLabel(AboutText) self["key_green"] = Button(_("Translations")) self["key_red"] = Button(_("Latest Commits")) self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "red": self.showCommits, "green": self.showTranslationInfo, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown }) self["hidden_action"] = ActionMap(["ColorActions"], { "red": self.red_action, "blue": self.blue_action, "info": self.info_action, "1": self.first_action, "2": self.second_action, "3": self.third_action, },-1) self.key_status = -1
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 })
def __init__(self, session): Screen.__init__(self, session) hddsplit = skin.parameters.get("AboutHddSplit", 0) #AboutHddSplit = 0 #try: # hddsplit = skin.parameters.get("AboutHddSplit",(0))[0] #except: # hddsplit = AboutHddSplit if boxtype == 'gb800solo': BoxName = "GigaBlue HD 800SOLO" elif boxtype == 'gb800se': BoxName = "GigaBlue HD 800SE" elif boxtype == 'gb800ue': BoxName = "GigaBlue HD 800UE" elif boxtype == 'gbquad': BoxName = "GigaBlue Quad" elif boxtype == 'gbquad4k': BoxName = "GigaBlue Quad 4k" elif boxtype == 'gbue4k': BoxName = "GigaBlue UE 4k" elif boxtype == 'gbquadplus': BoxName = "GigaBlue HD Quadplus" elif boxtype == 'gb800seplus': BoxName = "GigaBlue HD 800SEplus" elif boxtype == 'gb800ueplus': BoxName = "GigaBlue HD 800UEplus" elif boxtype == 'gbipbox': BoxName = "GigaBlue IP Box" elif boxtype == 'gbultra': BoxName = "GigaBlue HD Ultra" elif boxtype == 'gbultraue': BoxName = "GigaBlue HD Ultra UE" elif boxtype == 'gbultraueh': BoxName = "GigaBlue HD Ultra UEh" elif boxtype == 'gbultrase': BoxName = "GigaBlue HD Ultra SE" elif boxtype == 'gbx1': BoxName = "GigaBlue X1" elif boxtype == 'gbx2': BoxName = "GigaBlue X2" elif boxtype == 'gbx3': BoxName = "GigaBlue X3" elif boxtype == 'gbx3h': BoxName = "GigaBlue X3h" elif boxtype == 'spycat': BoxName = "XCORE Spycat" elif boxtype == 'quadbox2400': BoxName = "AX Quadbox HD2400" else: BoxName = about.getHardwareTypeString() self.setTitle(_("About") + " " + BoxName) ImageType = about.getImageTypeString() self["ImageType"] = StaticText(ImageType) Boxserial = popen('cat /proc/stb/info/sn').read().strip() serial = "" if Boxserial != "": serial = ":Serial : " + Boxserial AboutHeader = _("About") + " " + BoxName self["AboutHeader"] = StaticText(AboutHeader) AboutText = BoxName + " - " + ImageType + serial + "\n" #AboutText += _("Hardware: ") + about.getHardwareTypeString() + "\n" #AboutText += _("CPU: ") + about.getCPUInfoString() + "\n" #AboutText += _("Installed: ") + about.getFlashDateString() + "\n" #AboutText += _("Image: ") + about.getImageTypeString() + "\n" CPUinfo = _("CPU: ") + about.getCPUInfoString() self["CPUinfo"] = StaticText(CPUinfo) AboutText += CPUinfo + "\n" CPUspeed = _("Speed: ") + about.getCPUSpeedString() self["CPUspeed"] = StaticText(CPUspeed) #AboutText += "(" + about.getCPUSpeedString() + ")\n" ChipsetInfo = _("Chipset: ") + about.getChipSetString() self["ChipsetInfo"] = StaticText(ChipsetInfo) AboutText += ChipsetInfo + "\n" AboutText += _( "Enigma (re)starts: %d\n") % config.misc.startCounter.value fp_version = getFPVersion() if fp_version is None: fp_version = "" else: fp_version = _("Frontprocessor version: %s") % fp_version #AboutText += fp_version +"\n" self["FPVersion"] = StaticText(fp_version) AboutText += "\n" KernelVersion = _("Kernel version: ") + about.getKernelVersionString() self["KernelVersion"] = StaticText(KernelVersion) AboutText += KernelVersion + "\n" if getMachineBuild() == 'gb7252': b = popen('cat /proc/stb/info/version').read().strip() driverdate = str(b[0:4] + '-' + b[4:6] + '-' + b[6:8] + ' ' + b[8:10] + ':' + b[10:12] + ':' + b[12:14]) AboutText += _("DVB drivers: ") + driverdate + "\n" else: AboutText += _("DVB drivers: ") + self.realDriverDate() + "\n" #AboutText += _("DVB drivers: ") + about.getDriverInstalledDate() + "\n" ImageVersion = _("Last upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" EnigmaVersion = _( "GUI Build: ") + about.getEnigmaVersionString() + "\n" self["EnigmaVersion"] = StaticText(EnigmaVersion) #AboutText += EnigmaVersion #AboutText += _("Enigma (re)starts: %d\n") % config.misc.startCounter.value FlashDate = _("Flashed: ") + about.getFlashDateString() self["FlashDate"] = StaticText(FlashDate) AboutText += FlashDate + "\n" EnigmaSkin = _("Skin: ") + config.skin.primary_skin.value[0:-9] self["EnigmaSkin"] = StaticText(EnigmaSkin) AboutText += EnigmaSkin + "\n" AboutText += _( "Python version: ") + about.getPythonVersionString() + "\n" GStreamerVersion = _("GStreamer: ") + about.getGStreamerVersionString( ).replace("GStreamer", "") self["GStreamerVersion"] = StaticText(GStreamerVersion) AboutText += GStreamerVersion + "\n" twisted = popen('opkg list-installed |grep -i python-twisted-core' ).read().strip().split(' - ')[1] AboutText += "Python-Twisted: " + str(twisted) + "\n" AboutText += "\n" self["TunerHeader"] = StaticText(_("Detected NIMs:")) #AboutText += _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" #AboutText += _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s:(%s, %.1f %sB %s)" for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free() / 1024.0, "G", _("free")) else: hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free(), "M", _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo #AboutText += "\n\n" + _("Network Info") #for x in about.GetIPsFromNetworkInterfaces(): # AboutText += "\n" + iNetwork.getFriendlyAdapterDescription(x[0]) + " :" + "/dev/" + x[0] + " " + x[1] self["AboutScrollLabel"] = ScrollLabel(AboutText) self["key_green"] = Button(_("Translations")) self["key_red"] = Button(_("Latest Commits")) self["key_yellow"] = Button(_("Troubleshoot")) self["key_blue"] = Button(_("Memory Info")) self["key_info"] = Button(_("Contact Info")) self["actions"] = ActionMap( ["ColorActions", "SetupActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "red": self.showCommits, "green": self.showTranslationInfo, "blue": self.showMemoryInfo, "info": self.showContactInfo, "yellow": self.showTroubleshoot, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown })
def populate(self): self["lab1"] = StaticText(_("Open Black Hole")) self["lab2"] = StaticText(_("From the BH Team")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at %s") % "www.vuplus-community.net") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if about.getChipSetString() != _("unavailable"): if SystemInfo["HasHiSi"]: AboutText += _("Chipset:\tHiSilicon %s\n" ) % about.getChipSetString().upper() elif about.getIsBroadcom(): AboutText += _("Chipset:\tBroadcom %s\n" ) % about.getChipSetString().upper() else: AboutText += _( "Chipset:\t%s\n") % about.getChipSetString().upper() AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString()) imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion( ), getImageBuild(), imageSubBuild, getImageType().title()) 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() print "[About] HasHiSi = %s, slot = %s" % (SystemInfo["HasHiSi"], slot) if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][ slot]['root']: if slot > 4: image -= 4 else: image -= 1 part = "SDcard slot %s (%s) " % ( image, SystemInfo["canMultiBoot"][slot]['root']) AboutText += _("Image Slot:\t%s") % "STARTUP_" + str( slot) + " " + part + " " + bootmode + "\n" skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer ", "") AboutText += _("FFmpeg:\t%s\n") % about.getFFmpegVersionString( ).replace("FFmpeg ", "") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _( " (%s x %s)") % (skinWidth, skinHeight) + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): with open('/proc/stb/sensors/temp0/value', 'r') as f: tempinfo = f.read() elif path.exists('/proc/stb/fp/temp_sensor'): with open('/proc/stb/fp/temp_sensor', 'r') as f: tempinfo = f.read() elif path.exists('/proc/stb/sensors/temp/value'): with open('/proc/stb/sensors/temp/value', 'r') as f: tempinfo = f.read() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): with open('/proc/stb/fp/temp_sensor_avs', 'r') as f: tempinfo = f.read() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: with open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') as f: tempinfo = f.read() tempinfo = tempinfo[:-4] except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: tempinfo = search( 'temperature = (\d+) degree', open("/proc/hisi/msp/pm_cpu").read()).group(1) except: tempinfo = "" if tempinfo and int(tempinfo) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" 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%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)