def __init__(self): Renderer.__init__(self) VariableText.__init__(self) if getBoxType() == 'vuduo': self.stringlength = 16 else: self.stringlength = 12
def getChipSetString(): if getBoxType() in ('dm7080','dm820'): return "7435" else: try: f = open('/proc/stb/info/chipset', 'r') chipset = f.read() f.close() return str(chipset.lower().replace('\n','').replace('bcm','').replace('brcm','').replace('sti','')) except IOError: return "unavailable"
def getChipSetString(): if getBoxType() in ('dm7080', 'dm820'): return "7435" else: try: f = open('/proc/stb/info/chipset', 'r') chipset = f.read() f.close() return str(chipset.lower().replace('\n', '').replace( 'bcm', '').replace('brcm', '').replace('sti', '')) except IOError: return "unavailable"
class StandbySummary(Screen): if getBoxType() in ('gbquadplus', 'gbquad', 'gbultraue', 'gb800ueplus', 'gb800ue'): def __init__(self, session, what=None): root = "/usr/share/enigma2/lcd_skin/" try: what = open(root + "active").read() except: what = "clock_lcd_analog.xml" tmpskin = root + what self.skin = open(tmpskin, 'r').read() Screen.__init__(self, session) else: skin = """
def __init__(self, session, args=0): Screen.__init__(self, session) self.session = session self.MODEL = getBoxType() self.OEM = getBrandOEM() self.MACHINEBUILD = getMachineBuild() self.MACHINENAME = getMachineName() self.MACHINEBRAND = getMachineBrand() self.IMAGEFOLDER = getImageFolder() self.UBINIZE_ARGS = getMachineUBINIZE() self.MKUBIFS_ARGS = getMachineMKUBIFS() self.MTDKERNEL = getMachineMtdKernel() self.ROOTFSBIN = getMachineRootFile() self.KERNELBIN = getMachineKernelFile() self.ROOTFSTYPE = getImageFileSystem() print "[FULL BACKUP] BOX MACHINEBUILD = >%s<" % self.MACHINEBUILD print "[FULL BACKUP] BOX MACHINENAME = >%s<" % self.MACHINENAME print "[FULL BACKUP] BOX MACHINEBRAND = >%s<" % self.MACHINEBRAND print "[FULL BACKUP] BOX MODEL = >%s<" % self.MODEL print "[FULL BACKUP] OEM MODEL = >%s<" % self.OEM print "[FULL BACKUP] IMAGEFOLDER = >%s<" % self.IMAGEFOLDER print "[FULL BACKUP] UBINIZE = >%s<" % self.UBINIZE_ARGS print "[FULL BACKUP] MKUBIFS = >%s<" % self.MKUBIFS_ARGS print "[FULL BACKUP] MTDKERNEL = >%s<" % self.MTDKERNEL print "[FULL BACKUP] ROOTFSTYPE = >%s<" % self.ROOTFSTYPE self["key_green"] = Button("USB") self["key_red"] = Button("HDD") self["key_blue"] = Button(_("Exit")) self["key_yellow"] = Button("Create path usb") self["info-usb"] = Label( _("USB = Do you want to make a back-up on USB?\nThis will take between 4 and 15 minutes depending on the used filesystem and is fully automatic.\nMake sure you first insert an USB flash drive before you select USB." )) self["info-hdd"] = Label( _("HDD = Do you want to make an USB-back-up image on HDD? \nThis only takes 2 or 10 minutes and is fully automatic." )) self["actions"] = ActionMap( ["OkCancelActions", "ColorActions"], { "blue": self.quit, "yellow": self.yellow, "green": self.green, "red": self.red, "cancel": self.quit, }, -2)
def getCPUString(): if getBoxType() in ('xc7362'): return "Broadcom" else: try: system = "unknown" file = open('/proc/cpuinfo', 'r') lines = file.readlines() for x in lines: splitted = x.split(': ') if len(splitted) > 1: splitted[1] = splitted[1].replace('\n', '') if splitted[0].startswith("system type"): system = splitted[1].split(' ')[0] elif splitted[0].startswith("Processor"): system = splitted[1].split(' ')[0] file.close() return system except IOError: return "unavailable"
def getCPUString(): if getBoxType() in ('xc7362'): return "Broadcom" else: try: system="unknown" file = open('/proc/cpuinfo', 'r') lines = file.readlines() for x in lines: splitted = x.split(': ') if len(splitted) > 1: splitted[1] = splitted[1].replace('\n','') if splitted[0].startswith("system type"): system = splitted[1].split(' ')[0] elif splitted[0].startswith("Processor"): system = splitted[1].split(' ')[0] file.close() return system except IOError: return "unavailable"
def __init__(self, session, args = 0): Screen.__init__(self, session) self.session = session self.MODEL = getBoxType() self.OEM = getBrandOEM() self.MACHINEBUILD = getMachineBuild() self.MACHINENAME = getMachineName() self.MACHINEBRAND = getMachineBrand() self.IMAGEFOLDER = getImageFolder() self.UBINIZE_ARGS = getMachineUBINIZE() self.MKUBIFS_ARGS = getMachineMKUBIFS() self.MTDKERNEL = getMachineMtdKernel() self.ROOTFSBIN = getMachineRootFile() self.KERNELBIN = getMachineKernelFile() self.ROOTFSTYPE = getImageFileSystem() print "[FULL BACKUP] BOX MACHINEBUILD = >%s<" %self.MACHINEBUILD print "[FULL BACKUP] BOX MACHINENAME = >%s<" %self.MACHINENAME print "[FULL BACKUP] BOX MACHINEBRAND = >%s<" %self.MACHINEBRAND print "[FULL BACKUP] BOX MODEL = >%s<" %self.MODEL print "[FULL BACKUP] OEM MODEL = >%s<" %self.OEM print "[FULL BACKUP] IMAGEFOLDER = >%s<" %self.IMAGEFOLDER print "[FULL BACKUP] UBINIZE = >%s<" %self.UBINIZE_ARGS print "[FULL BACKUP] MKUBIFS = >%s<" %self.MKUBIFS_ARGS print "[FULL BACKUP] MTDKERNEL = >%s<" %self.MTDKERNEL print "[FULL BACKUP] ROOTFSTYPE = >%s<" %self.ROOTFSTYPE self["key_green"] = Button("USB") self["key_red"] = Button("HDD") self["key_blue"] = Button(_("Exit")) self["key_yellow"] = Button("Create path usb") self["info-usb"] = Label(_("USB = Do you want to make a back-up on USB?\nThis will take between 4 and 15 minutes depending on the used filesystem and is fully automatic.\nMake sure you first insert an USB flash drive before you select USB.")) self["info-hdd"] = Label(_("HDD = Do you want to make an USB-back-up image on HDD? \nThis only takes 2 or 10 minutes and is fully automatic.")) self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], { "blue": self.quit, "yellow": self.yellow, "green": self.green, "red": self.red, "cancel": self.quit, }, -2)
def box(self): box = getBoxType() machinename = getMachineName() if box in ('uniboxhd1', 'uniboxhd2', 'uniboxhd3'): box = "ventonhdx" elif box == 'odinm6': box = getMachineName().lower() elif box == "inihde" and machinename.lower() == "xpeedlx": box = "xpeedlx" elif box in ('xpeedlx1', 'xpeedlx2'): box = "xpeedlx" elif box == "inihde" and machinename.lower() == "hd-1000": box = "sezam-1000hd" elif box == "ventonhdx" and machinename.lower() == "hd-5000": box = "sezam-5000hd" elif box == "ventonhdx" and machinename.lower() == "premium twin": box = "miraclebox-twin" elif box == "xp1000" and machinename.lower() == "sf8 hd": box = "sf8" elif box.startswith('et') and not box in ('et8000', 'et8500', 'et8500s', 'et10000'): box = box[0:3] + 'x00' elif box == 'odinm9' and self.feed == "sftbeta": box = 'maram9' return box