コード例 #1
0
ファイル: DreamInfoHandler.py プロジェクト: ostende/test2
    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 = []
コード例 #2
0
ファイル: UsageConfig.py プロジェクト: ostende/test2
 def get_default_RC():
     device = HardwareInfoVu().get_device_name()
     if device == "duo2":
         return "2"
     elif device == "ultimo":
         return "1"
     return "0"
コード例 #3
0
ファイル: BackupRestore.py プロジェクト: ostende/test2
    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)
コード例 #4
0
 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
コード例 #5
0
 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
コード例 #6
0
 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
コード例 #7
0
    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
コード例 #8
0
 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+")
コード例 #9
0
 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
コード例 #10
0
ファイル: BackupRestore.py プロジェクト: ostende/test2
 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)
コード例 #11
0
ファイル: ImageUpgrade.py プロジェクト: ostende/test2
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
コード例 #12
0
ファイル: ImageUpgrade.py プロジェクト: ostende/test2
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'
コード例 #13
0
ファイル: BackupSuite.py プロジェクト: ostende/test2
    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)
コード例 #14
0
ファイル: BackupSuite.py プロジェクト: ostende/test2
 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'
コード例 #15
0
    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",
コード例 #16
0
ファイル: NewsCenter.py プロジェクト: ostende/test2
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'