def __init__(self, statusCallback, blocking=False, neededTag=None, neededFlag=None): self.hardware_info = HardwareInfo() self.hardware_info_vu = HardwareInfoVu() self.directory = "/" self.neededTag = neededTag self.neededFlag = neededFlag # caution: blocking should only be used, if further execution in enigma2 depends on the outcome of # the installer! self.blocking = blocking self.currentlyInstallingMetaIndex = None self.console = eConsoleAppContainer() self.console.appClosed.append(self.installNext) self.reloadFavourites = False self.statusCallback = statusCallback self.setStatus(self.STATUS_INIT) self.packageslist = [] self.packagesIndexlist = [] self.packageDetails = [] self.bouquet_list_tv = [] self.bouquet_list_radio = []
def get_default_RC(): device = HardwareInfoVu().get_device_name() if device == "duo2": return "2" elif device == "ultimo": return "1" return "0"
def fill_list(self): self.flist = [] self.path = getBackupPathImage() boxtypes = ('solo', 'duo', 'uno', 'ultimo', 'solo2', 'duo2', 'solose', 'zero') boxtype = HardwareInfoVu().get_device_name() if path.exists(self.path) == False: makedirs(self.path) for dir in listdir(self.path): show_file = True for box in boxtypes: if dir.find('-' + box + '-') != -1: if box == boxtype: show_file = True else: show_file = False break if (dir.startswith('vti-') or dir.startswith('vti_')) and show_file == True: self.flist.append(dir) self.entry = True self.flist.sort(reverse=True) self['filelist'].l.setList(self.flist)
def getModel(self): try: box_info = HardwareInfoVu().get_device_name().upper() except: return "Model: N/A" box_info = None if box_info is not None: return "VU+ %s" % box_info
def __init__(self): Renderer.__init__(self) VariableText.__init__(self) self.moveTimerText = None self.delayTimer = None vumodel = HardwareInfoVu().get_device_name() if vumodel == 'duo': self.stringlength = 16 else: self.stringlength = 12
def getSTBType(cls): try: from Tools.HardwareInfoVu import HardwareInfoVu STBType = HardwareInfoVu().get_device_name() except: try: from Tools.HardwareInfo import HardwareInfo STBType = HardwareInfo().get_device_name() except: STBType = "unknown" return STBType
def getModel(self): try: box_info = HardwareInfoVu().get_device_name().upper() except: return 'Model: N/A' box_info = None if box_info is not None: return 'VU+ %s' % box_info else: return
def getDeviceName(self): deviceList = { "duo": "Vu+ Duo", "solo": "Vu+ Solo", "uno": "Vu+ Uno", "ultimo": "Vu+ Ultimo", "solo2": "Vu+ Solo2", "duo2": "Vu+ Duo2", "zero": "Vu+ zero", "solose": "Vu+ SoloSE", } vumodel = HardwareInfoVu().get_device_name() return deviceList.setdefault(vumodel, "VU+")
def getModel(self): retTXT = '' try: box_info = HardwareInfoVu().get_device_name().upper() retTXT = "VU+ %s" % box_info except Exception: try: box_info = HardwareInfo().get_device_name().upper() if self.justValue: retTXT = box_info else: retTXT = "Model: %s" % box_info except Exception: if self.justValue: retTXT = "N/A" else: retTXT = "Model: N/A" return retTXT
def __init__(self, session, title='Restore/Backup VTimage', restorepath=None, backuppath=None, image_flash=False): Screen.__init__(self, session) self.restorepath = restorepath self.backuppath = backuppath self.image_flash = image_flash self.run = True self.error = False self.finished = False self.device = HardwareInfoVu().get_device_name() self.vtiversion = getVTiVersionString() if self.restorepath: skin = skin_2 elif self.backuppath: skin = skin_1 self['task_one'] = Label() self['task_two'] = Label() self['task_three'] = Label() self['task_four'] = Label() self['task_one_state'] = Label() self['task_two_state'] = Label() self['task_three_state'] = Label() self['task_four_state'] = Label() self['progress'] = ProgressBar() self.skin = skin self['actions'] = ActionMap(['OkCancelActions'], { 'ok': self.keyOk, 'cancel': self.keyCancel }) self['description'] = Label() self.text_done = _('[ ok ]') self.logfile = '/tmp/vti-backup.log' self.text_logfile_hint = _( '\n\nPlease take a look at\n%s\nfor more details') % self.logfile self.mount = '/bin/mount' self.umount = '/bin/umount' self.rm = '/bin/rm' self.touch = '/bin/touch' self.mk_ubifs = '/usr/sbin/mkfs.ubifs' self.mk_jffs2 = '/usr/sbin/mkfs.jffs2' self.nanddump = '/usr/sbin/nanddump' self.ubinize = '/usr/sbin/ubinize' self.flash_erase = '/usr/sbin/flash_erase' self.nand_write = '/usr/sbin/nandwrite' self.ubi_image2nand = '/usr/sbin/ubi-image2nand' self.onLayoutFinish.append(self.layoutFinished)
def check_flash_files(path): hwdevice = HardwareInfoVu().get_device_name() if path.endswith('/'): path = path + 'vuplus/' + hwdevice + '/' else: path = path + '/vuplus/' + hwdevice + '/' if hwdevice in ('duo', 'solo', 'uno', 'ultimo'): if fileExists(path + 'kernel_cfe_auto.bin') and fileExists( path + 'root_cfe_auto.jffs2'): return True elif hwdevice in ('solo2', 'duo2', 'solose', 'zero'): if fileExists(path + 'kernel_cfe_auto.bin') and fileExists( path + 'root_cfe_auto.bin'): return True return False
def getDeviceName(): hwdevice = HardwareInfoVu().get_device_name() if hwdevice == 'duo': return 'bm750' elif hwdevice == 'solo': return 'vusolo' elif hwdevice == 'uno': return 'vuuno' elif hwdevice == 'ultimo': return 'vuultimo' elif hwdevice == 'solo2': return 'vusolo2' elif hwdevice == 'duo2': return 'vuduo2' elif hwdevice == 'solose': return 'vusolose' elif hwdevice == 'zero': return 'vuzero' else: return 'noDevice'
def fill_list(self): self.flist = [] self.path = getBackupRestorePath() boxtypes = ('solo', 'duo', 'uno', 'ultimo', 'solo2', 'duo2', 'solose', 'zero') boxtype = HardwareInfoVu().get_device_name() if self.path: for file in listdir(self.path): show_file = True for box in boxtypes: if file.find('_' + box + '.') != -1: if box == boxtype: show_file = True else: show_file = False break if file.startswith('pluginlist') and file.endswith( '.lst' ) and self.restoretype == 'plugininstall' and show_file: self.flist.append(file) self.entry = True elif file.startswith('settings') and file.endswith( '.tar.gz' ) and self.restoretype == 'settingrestore' and show_file: self.flist.append(file) self.entry = True elif file.startswith('configuration') and file.endswith( '.tar.gz' ) and self.restoretype == 'configrestore' and show_file: self.flist.append(file) self.entry = True elif file.startswith(('backup', 'restore')) and file.endswith( '.sh' ) and self.restoretype == 'personalscript' and show_file: self.flist.append(file) self['key_green'] = StaticText(_('Start')) self.entry = True self.flist.sort(reverse=True) self['filelist'].l.setList(self.flist)
def __init__(self, backuptype=None): self.executiontime = getDateTime() self.boxtype = HardwareInfoVu().get_device_name() self.executiontime += '_%s' % self.boxtype if backuptype == 'auto': self.executiontime += '.auto'
leds = 0 if fileExists("/proc/stb/fp/led_set_pattern"): leds += 1 while fileExists("/proc/stb/fp/led%d_pattern" % leds): leds += 1 return leds SystemInfo["NumFrontpanelLEDs"] = countFrontpanelLEDs() SystemInfo["FrontpanelDisplay"] = fileExists("/dev/dbox/oled0") or fileExists( "/dev/dbox/lcd0") SystemInfo["FrontpanelDisplayGrayscale"] = fileExists("/dev/dbox/oled0") SystemInfo["DeepstandbySupport"] = HardwareInfo().get_device_name() != "dm800" SystemInfo["GraphicVFD"] = HardwareInfoVu().get_device_name( ) == "ultimo" or HardwareInfoVu().get_device_name() == "duo2" SystemInfo["HasHbbTV"] = fileExists( "/usr/lib/enigma2/python/Plugins/Extensions/HbbTV/plugin.py" ) or fileExists("/usr/lib/enigma2/python/Plugins/Extensions/HbbTV/plugin.pyo") SystemInfo["CanPiP"] = getNumVideoDecoders() > 1 SystemInfo["Can3DSurround"] = fileExists("/proc/stb/audio/3d_surround_choices") SystemInfo["CanSpeakerPosition"] = fileExists( "/proc/stb/audio/3d_surround_speaker_position_choices") SystemInfo["CanAVL"] = fileExists("/proc/stb/audio/avl_choices") SystemInfo["CanDownmixAC3"] = fileExists("/proc/stb/audio/ac3_choices") # disable AAC downmix for now, has to be converted to AC3 in passthrough mode SystemInfo["CanDownmixAAC"] = False #fileExists("/proc/stb/audio/aac_choices") SystemInfo["CanMultiChannelPCM"] = fileExists( "/proc/stb/audio/multichannel_pcm") SystemInfo["Support3DUI"] = HardwareInfoVu().get_device_name() in ("solo2", "duo2",
from Tools.Directories import * from Tools.LoadPixmap import LoadPixmap from Tools.Notifications import AddNotificationWithCallback from skin import loadSkin from os import path as os_path, remove from UpgradeVti import UpdatePlugin from Tools.HardwareInfoVu import HardwareInfoVu from enigma import getVTiVersionString, eTimer import xml.dom.minidom from xml.dom.minidom import Node from cPickle import dump, load import urllib2 from __init__ import _ packagetmpfile = '/tmp/.package.tmp' cache_file = '/tmp/.updatecache' vumodel = HardwareInfoVu().get_device_name() def getHeader(): imageversion = getVTiVersionString() ret = 'VTi ' + imageversion + ' (Vu+ ' if vumodel == 'duo': ret += 'Duo)\n' elif vumodel == 'solo': ret += 'Solo)\n' elif vumodel == 'uno': ret += 'Uno)\n' elif vumodel == 'ultimo': ret += 'Ultimo)\n' elif vumodel == 'solo2': ret += 'Solo2)\n'