def __init__(self, session): Screen.__init__(self, session) from Tools.HardwareInfo import HardwareInfo model = HardwareInfo().get_device_name() if model == "optimussos2": AboutText = _("Hardware: ") + "OPTIMUSS OS2" + "\n" elif model == "optimussos1": AboutText = _("Hardware: ") + "OPTIMUSS OS1" + "\n" else: AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" import fcntl, socket, struct def getHwAddr(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1] macaddress = getHwAddr("eth0") self["MacAddress"] = StaticText(_("Mac Address:") + " " + macaddress) AboutText += _("Mac Address:") + " " + macaddress + "\n" if HardwareInfo().has_micom(): AboutText += _( "Micom Version: ") + about.getMicomVersionString() + "\n" AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _( "Kernel version: ") + about.getKernelVersionString() + "\n" EnigmaVersion = "Enigma: " + about.getEnigmaVersionString() self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + "\n" ImageVersion = _("Last upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" # [iq if model == "mediabox": AboutText += _("Powered by Jepssen") + "\n" elif model == "optimussos1" or model == "optimussos2": AboutText += _("Powered by Edision") + "\n" else: AboutText += _("Powered by 4D") + "\n" # iq] # [iq # fp_version = getFPVersion() # if fp_version is None: # fp_version = "" # else: # fp_version = _("Frontprocessor version: %d") % fp_version # AboutText += fp_version + "\n" # # self["FPVersion"] = StaticText(fp_version) # iq] self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % ( hdd.model(), hdd.capacity(), hdd.free() / 1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % ( hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo self["AboutScrollLabel"] = ScrollLabel(AboutText) self["actions"] = ActionMap( ["SetupActions", "ColorActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "green": self.showTranslationInfo, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown }) self["hidden_action"] = ActionMap( ["ColorActions"], { "red": self.red_action, "blue": self.blue_action, "info": self.info_action, "1": self.first_action, "2": self.second_action, "3": self.third_action, }, -1) self.key_status = -1
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 getMicomVersion(self): if HardwareInfo().has_micom(): return about.getMicomVersionString() else: return "N/A"
def __init__(self, session): Screen.__init__(self, session) AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" # iq [ from Tools.HardwareInfo import HardwareInfo if HardwareInfo().has_micom(): AboutText += _( "Micom Version: ") + about.getMicomVersionString() + "\n" # ] AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _( "Kernel Version: ") + about.getKernelVersionString() + "\n" EnigmaVersion = "Enigma: " + about.getEnigmaVersionString() self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + "\n" ImageVersion = _("Last Upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" # [iq AboutText += _("Powered by 4D") + "\n" # iq] self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % ( hdd.model(), hdd.capacity(), hdd.free() / 1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % ( hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo self["AboutScrollLabel"] = ScrollLabel(AboutText) self["actions"] = ActionMap( ["SetupActions", "ColorActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "green": self.showTranslationInfo, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown }) # iq [ self["hidden_action"] = ActionMap(["ColorActions"], { "red": self.red_action, "blue": self.blue_action, }, -1) self.key_status = -1
def __init__(self, session): Screen.__init__(self, session) # [ IQON : by knuth macaddress = about.getMacAddressString("eth0") AboutText = _("Hardware: ") + about.getHardwareModelString() 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" 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) AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" # iq [ import fcntl, socket, struct def getHwAddr(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1] macaddress = getHwAddr("eth0") self["MacAddress"] = StaticText(_("Mac Address:") + " " + macaddress) AboutText += _("Mac Address:") + " " + macaddress + "\n" from Tools.HardwareInfo import HardwareInfo if HardwareInfo().has_micom(): AboutText += _("Micom Version: ") + about.getMicomVersionString() + "\n" # ] AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Kernel Version: ") + about.getKernelVersionString() + "\n" EnigmaVersion = "Enigma: " + about.getEnigmaVersionString() self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + "\n" ImageVersion = _("Last Upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" # [iq AboutText += _("Powered by 4D") + "\n" # iq] self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo self["AboutScrollLabel"] = ScrollLabel(AboutText) self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "green": self.showTranslationInfo, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown }) # iq [ self["hidden_action"] = ActionMap(["ColorActions"], { "red": self.red_action, "blue": self.blue_action, },-1) self.key_status = -1
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) AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" # iq [ from Tools.HardwareInfo import HardwareInfo if HardwareInfo().has_micom(): AboutText += _("Micom Version: ") + about.getMicomVersionString() + "\n" # ] AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Kernel Version: ") + about.getKernelVersionString() + "\n" EnigmaVersion = "Enigma: " + about.getEnigmaVersionString() self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + "\n" ImageVersion = _("Last Upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" # [iq AboutText += _("Powered by 4D") + "\n" # iq] self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo self["AboutScrollLabel"] = ScrollLabel(AboutText) self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "green": self.showTranslationInfo, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown }) # iq [ self["hidden_action"] = ActionMap(["ColorActions"], { "red": self.red_action, "blue": self.blue_action, },-1) self.key_status = -1
def __init__(self, session): Screen.__init__(self, session) from Tools.HardwareInfo import HardwareInfo model = HardwareInfo().get_device_name() if model == "optimussos2": AboutText = _("Hardware: ") + "OPTIMUSS OS2" + "\n" elif model == "optimussos1": AboutText = _("Hardware: ") + "OPTIMUSS OS1" + "\n" if model == "optimussos2plus": AboutText = _("Hardware: ") + "OPTIMUSS OS2+" + "\n" elif model == "optimussos1plus": AboutText = _("Hardware: ") + "OPTIMUSS OS1+" + "\n" else: AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" import fcntl, socket, struct def getHwAddr(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1] macaddress = getHwAddr("eth0") self["MacAddress"] = StaticText(_("Mac Address:") + " " + macaddress) AboutText += _("Mac Address:") + " " + macaddress + "\n" if HardwareInfo().has_micom(): AboutText += _("Micom Version: ") + about.getMicomVersionString() + "\n" AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n" EnigmaVersion = "Enigma: " + about.getEnigmaVersionString() self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += EnigmaVersion + "\n" ImageVersion = _("Last upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) AboutText += ImageVersion + "\n" # [iq if model == "mediabox": AboutText += _("Powered by Jepssen") + "\n" elif model == "optimussos1" or model == "optimussos2": AboutText += _("Powered by Edision") + "\n" else: AboutText += _("Powered by 4D") + "\n" # iq] # [iq # fp_version = getFPVersion() # if fp_version is None: # fp_version = "" # else: # fp_version = _("Frontprocessor version: %d") % fp_version # AboutText += fp_version + "\n" # # self["FPVersion"] = StaticText(fp_version) # iq] self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % (hdd.model(), hdd.capacity(), hdd.free()/1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % (hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo self["AboutScrollLabel"] = ScrollLabel(AboutText) self["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