コード例 #1
0
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		if about.getImageTypeString() == 'Release':
			self["selected"] = StaticText("ViX:" + about.getImageVersionString() + ' (R)')
		elif about.getImageTypeString() == 'Experimental':
			self["selected"] = StaticText("ViX:" + about.getImageVersionString() + ' (B)')
		if getBoxType() == 'vuuno':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Uno")
		elif getBoxType() == 'vuultimo':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Ultimo")
		elif getBoxType() == 'vusolo':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Solo")
		elif getBoxType() == 'vuduo':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Duo")
		elif getBoxType() == 'et5x00':
			self["BoxType"] = StaticText(_("Hardware:") + " Xtrend ET5x00 Series")
		elif getBoxType() == 'et6x00':
			self["BoxType"] = StaticText(_("Hardware:") + " Xtrend ET6x00 Series")
		elif getBoxType() == 'et9x00':
			self["BoxType"] = StaticText(_("Hardware:") + " Xtrend ET9x00 Series")
		elif getBoxType() == 'odin':
			self["BoxType"] = StaticText(_("Hardware:") + " Odin")
		else:
			self["BoxType"] = StaticText(_("Hardware:") + " " + getBoxType())
		self["KernelVersion"] = StaticText(_("Kernel:") + " " + about.getKernelVersionString())
		self["ImageType"] = StaticText(_("Image:") + " " + about.getImageTypeString())
		self["ImageVersion"] = StaticText(_("Version:") + " " + about.getImageVersionString() + "   " + _("Build:") + " " + about.getBuildVersionString())
		self["EnigmaVersion"] = StaticText(_("Last Update:") + " " + about.getLastUpdateString())
コード例 #2
0
 def checkNetworkStateFinished(self, result, retval, extra_args=None):
     if (float(about.getImageVersionString()) < 3.0
             and result.find('mipsel/Packages.gz, wget returned 1') != -1
         ) or (float(about.getImageVersionString()) >= 3.0 and
               result.find('mips32el/Packages.gz, wget returned 1') != -1):
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("Sorry feeds are down for maintenance, please try again later."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True)
     elif result.find('bad address') != -1:
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("Your STB_BOX is not connected to the internet, please check your network settings and try again."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True)
     elif result.find('Collected errors') != -1:
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("A background update check is is progress, please wait a few minutes and try again."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True)
     else:
         self.startCheck()
コード例 #3
0
    def dataAvail(self, str):
        if self.type == self.DOWNLOAD and (
            (float(about.getImageVersionString()) < 3.0
             and str.find('mipsel/Packages.gz, wget returned 1') != -1) or
            (float(about.getImageVersionString()) >= 3.0
             and str.find('mips32el/Packages.gz, wget returned 1') != -1)):
            self.run = 3
            return

        #prepend any remaining data from the previous call
        str = self.remainingdata + str
        #split in lines
        lines = str.split('\n')
        #'str' should end with '\n', so when splitting, the last line should be empty. If this is not the case, we received an incomplete line
        if len(lines[-1]):
            #remember this data for next time
            self.remainingdata = lines[-1]
            lines = lines[0:-1]
        else:
            self.remainingdata = ""

        if self.check_settings:
            self.check_settings = False
            self.remove_settings_name = str.split(' - ')[0].replace(
                self.PLUGIN_PREFIX, '')
            self.session.openWithCallback(
                self.runSettingsRemove, MessageBox,
                _('You already have a channel list installed,\nwould you like to remove\n"%s"?'
                  ) % self.remove_settings_name)
            return

        if self.check_bootlogo:
            self.check_bootlogo = False
            self.remove_bootlogo_name = str.split(' - ')[0].replace(
                self.PLUGIN_PREFIX, '')
            self.session.openWithCallback(
                self.runBootlogoRemove, MessageBox,
                _('You already have a bootlogo installed,\nwould you like to remove\n"%s"?'
                  ) % self.remove_bootlogo_name)
            return

        for x in lines:
            plugin = x.split(" - ", 2)
            # 'opkg list_installed' only returns name + version, no description field
            if len(plugin) >= 2:
                if not plugin[0].endswith('-dev') and not plugin[0].endswith(
                        '-staticdev') and not plugin[0].endswith(
                            '-dbg') and not plugin[0].endswith('-doc'):
                    if self.run == 1 and self.type == self.DOWNLOAD:
                        if plugin[0] not in self.installedplugins:
                            self.installedplugins.append(plugin[0])
                    else:
                        if plugin[0] not in self.installedplugins:
                            if len(plugin) == 2:
                                # 'opkg list_installed' does not return descriptions, append empty description
                                plugin.append('')
                            plugin.append(plugin[0][15:])

                            self.pluginlist.append(plugin)
コード例 #4
0
ファイル: About.py プロジェクト: kolombek/enigma2
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		self.skinName = "AboutSummaryAAF"
		if about.getImageTypeString() == 'Release':
			self["selected"] = StaticText("AAF:" + about.getImageVersionString() + ' (R)')
		elif about.getImageTypeString() == 'Experimental':
			self["selected"] = StaticText("AAF:" + about.getImageVersionString() + ' (B)')
		if getBoxType() == 'vuuno':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Uno")
		elif getBoxType() == 'vuultimo':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Ultimo")
		elif getBoxType() == 'vusolo':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Solo")
		elif getBoxType() == 'vuduo':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Duo")
		elif getBoxType() == 'vusolo2':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Solo 2")
		elif getBoxType() == 'vuduo2':
			self["BoxType"] = StaticText(_("Hardware:") + " Vu+ Duo 2")			
		elif getBoxType() == 'et4x00':
			self["BoxType"] = StaticText(_("Hardware:") + " Xtrend ET4x00 Series")	
		elif getBoxType() == 'et5x00':
			self["BoxType"] = StaticText(_("Hardware:") + " Xtrend ET5x00 Series")
		elif getBoxType() == 'et6x00':
			self["BoxType"] = StaticText(_("Hardware:") + " Xtrend ET6x00 Series")
		elif getBoxType() == 'et9x00':
			self["BoxType"] = StaticText(_("Hardware:") + " Xtrend ET9x00 Series")
		elif getBoxType() == 'odinm9':
			self["BoxType"] = StaticText(_("Hardware:") + " Odin M9")
		elif getBoxType() == 'odinm7':
			self["BoxType"] = StaticText(_("Hardware:") + " Odin M7")			
		elif getBoxType() == 'gb800solo':
			self["BoxType"] = StaticText(_("Hardware:") + " GigaBlue HD 800SOLO")
		elif getBoxType() == 'gb800se':
			self["BoxType"] = StaticText(_("Hardware:") + " GigaBlue HD 800SE")
		elif getBoxType() == 'gb800ue':
			self["BoxType"] = StaticText(_("Hardware:") + " GigaBlue HD 800UE")
		elif getBoxType() == 'gbquad':
			self["BoxType"] = StaticText(_("Hardware:") + " GigaBlue HD QUAD")
		elif getBoxType() == 'ventonhdx':
			self["BoxType"] = StaticText(_("Hardware:") + " Venton Unibox HDx")
		elif getBoxType() == 'ixussone':
			self["BoxType"] = StaticText(_("Hardware:") + " Ixuss Onex")
		elif getBoxType() == 'xp1000':
			self["BoxType"] = StaticText(_("Hardware:") + " XP1000")
		else:
			self["BoxType"] = StaticText(_("Hardware:") + " " + getBoxType())
		self["KernelVersion"] = StaticText(_("Kernel:") + " " + about.getKernelVersionString())
		self["ImageType"] = StaticText(_("Image:") + " " + about.getImageTypeString())
		self["ImageVersion"] = StaticText(_("Version:") + " " + about.getImageVersionString() + "   " + _("Build:") + " " + about.getBuildVersionString())
		self["EnigmaVersion"] = StaticText(_("Last Update:") + " " + about.getLastUpdateString())
コード例 #5
0
 def getText(self):
     if self.type == self.BOXTYPE:
         return getBoxType()
     if self.type == self.MACHINEBRAND:
         return getMachineBrand()
     if self.type == self.MACHINENAME:
         return getMachineName()
     if self.type == self.DRIVERSDATE:
         return getDriverDate()
     if self.type == self.IMAGEVERSION:
         return 'EGAMI %s' % about.getImageVersionString()
     if self.type == self.ALL:
         return 'EGAMI %s - %s %s' % (about.getImageVersionString(),
                                      getMachineBrand(), getMachineName())
コード例 #6
0
ファイル: downloader.py プロジェクト: openpli-arm/enigma2-arm
    def setMenu(self):
        self.menulist = []
        try:
            latest_release = "Release %s (Opendreambox 1.5)" % self.feedlists[RELEASE][0][0][-9:-4]
            self.menulist.append(
                (RELEASE, _("Get latest release image"), _("Download %s from Server") % latest_release, None)
            )
        except IndexError:
            pass

        try:
            dat = self.feedlists[EXPERIMENTAL][0][0][-12:-4]
            latest_experimental = "Experimental %s-%s-%s (Opendreambox 1.6)" % (dat[:4], dat[4:6], dat[6:])
            self.menulist.append(
                (
                    EXPERIMENTAL,
                    _("Get latest experimental image"),
                    _("Download %s from Server") % latest_experimental,
                    None,
                )
            )
        except IndexError:
            pass

        self.menulist.append((ALLIMAGES, _("Choose image to download"), _("Select desired image from feed list"), None))
        self.menulist.append(
            (STICK_WIZARD, _("USB stick wizard"), _("Prepare another USB stick for image flashing"), None)
        )
        self["menu"].setList(self.menulist)
        self["status"].text = _("Currently installed image") + ": %s" % (about.getImageVersionString())
        self.branch = START
        self.updateButtons()
コード例 #7
0
ファイル: SoftwareUpdate.py プロジェクト: torac/enigma2
	def getlog(self):
		if not path.exists('/tmp/' + self.logtype + '-git.log'):
			import urllib
			sourcefile = 'http://enigma2.world-of-satellite.com/feeds/' + about.getImageVersionString() + '/' + self.logtype + '-git.log'
			sourcefile,headers = urllib.urlretrieve(sourcefile)
			rename(sourcefile,'/tmp/' + self.logtype + '-git.log')
		fd = open('/tmp/' + self.logtype + '-git.log', 'r')
		releasenotes = fd.read()
		fd.close()
		releasenotes = releasenotes.replace('\nopenvix: build',"\n\nopenvix: build")
		releasenotes = releasenotes.split('\n\n')
		ver=0
		releasever = releasenotes[int(ver)].split('\n')
		releasever = releasever[0].split(' ')
		releasever = releasever[2].replace(':',"")
		viewrelease=""
		while int(releasever) > int(about.getBuildVersionString()):
			viewrelease += releasenotes[int(ver)]+'\n\n'
			ver += 1
			releasever = releasenotes[int(ver)].split('\n')
			releasever = releasever[0].split(' ')
			releasever = releasever[2].replace(':',"")
		self["text"].setText(viewrelease)
		summarytext = viewrelease.split(':\n')
		try:
			self['title_summary'].setText(summarytext[0]+':')
			self['text_summary'].setText(summarytext[1])
		except:
			self['title_summary'].setText("")
			self['text_summary'].setText("")
コード例 #8
0
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent=parent)
     EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
     self['selected'] = Label(EGAMIVersion)
     AboutText = _('Model: %s %s\n') % (getMachineBrand(), getMachineName())
     if path.exists('/proc/stb/info/chipset'):
         chipset = open('/proc/stb/info/chipset', 'r').read()
         AboutText += _('Chipset: BCM%s') % chipset.replace('\n', '') + '\n'
     AboutText += _('Version: %s') % getImageVersion() + '\n'
     AboutText += _('Build: %s') % getImageVersion() + '\n'
     AboutText += _('Kernel: %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: %s') % driversdate + '\n'
     AboutText += _('Last update: %s') % getEnigmaVersionString() + '\n\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'
     self['AboutText'] = StaticText(AboutText)
コード例 #9
0
 def __init__(self):
     aboutInfo = about.getImageVersionString()
     if aboutInfo.startswith("dev-"):
         self.ImageVersion = 'Experimental'
     else:
         self.ImageVersion = 'Stable'
     self.language = language.getLanguage(
     )[:2]  # getLanguage returns e.g. "fi_FI" for "language_country"
     PackageInfoHandler.__init__(self,
                                 self.statusCallback,
                                 neededTag='ALL_TAGS',
                                 neededFlag=self.ImageVersion)
     self.directory = resolveFilename(SCOPE_METADIR)
     self.list = List([])
     self.NotifierCallback = None
     self.Console = Console()
     self.UpdateConsole = Console()
     self.cmdList = []
     if config.misc.extraopkgpackages.value is True:
         self.unwanted_extensions = ('--pycache--')
     else:
         self.unwanted_extensions = ('-dev', '-staticdev', '-dbg', '-doc',
                                     '-src', '-po', '--pycache--')
     self.opkg = OpkgComponent()
     self.opkg.addCallback(self.opkgCallback)
コード例 #10
0
ファイル: About.py プロジェクト: kingvuplus/EG-gui2-1
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent=parent)
     EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
     self['selected'] = Label(EGAMIVersion)
     AboutText = _('Model: %s %s\n') % (getMachineBrand(), getMachineName())
     if path.exists('/proc/stb/info/chipset'):
         chipset = open('/proc/stb/info/chipset', 'r').read()
         AboutText += _('Chipset: BCM%s') % chipset.replace('\n', '') + '\n'
     AboutText += _('Version: %s') % getImageVersion() + '\n'
     AboutText += _('Build: %s') % getImageVersion() + '\n'
     AboutText += _('Kernel: %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: %s') % driversdate + '\n'
     AboutText += _('Last update: %s') % getEnigmaVersionString() + '\n\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'
     self['AboutText'] = StaticText(AboutText)
コード例 #11
0
    def setMenu(self):
        self.menulist = []
        try:
            latest_release = "Release %s (Opendreambox 1.5)" % self.feedlists[
                RELEASE][0][0][-9:-4]
            self.menulist.append(
                (RELEASE, _("Get latest release image"),
                 _("Download %s from Server") % latest_release, None))
        except IndexError:
            pass

        try:
            dat = self.feedlists[EXPERIMENTAL][0][0][-12:-4]
            latest_experimental = "Experimental %s-%s-%s (Opendreambox 1.6)" % (
                dat[:4], dat[4:6], dat[6:])
            self.menulist.append(
                (EXPERIMENTAL, _("Get latest experimental image"),
                 _("Download %s from Server") % latest_experimental, None))
        except IndexError:
            pass

        self.menulist.append((ALLIMAGES, _("Choose image to download"),
                              _("Select desired image from feed list"), None))
        self.menulist.append(
            (STICK_WIZARD, _("USB stick wizard"),
             _("Prepare another USB stick for image flashing"), None))
        self["menu"].setList(self.menulist)
        self["status"].text = _("Currently installed image") + ": %s" % (
            about.getImageVersionString())
        self.branch = START
        self.updateButtons()
コード例 #12
0
ファイル: plugin.py プロジェクト: vuteam/dvbapp
def generateInformation():
    from os import popen
    from Tools.DreamboxHardware import getFPVersion
    from Components.Harddisk import harddiskmanager
    from Components.NimManager import nimmanager
    from Components.About import about

    def command(cmd):
        try:
            result = popen(cmd, "r").read().strip()
            return str(result)
        except:
            pass

    information = [
        "kernel         : %s\n" % (command("uname -a")),
        "version        : %s (%s)\n" % (str(about.getImageVersionString()),
                                        str(about.getEnigmaVersionString())),
        "frontprocessor : %s\n" % (str(getFPVersion())),
        "frontend       : %s\n" % (str(nimmanager.nimList())),
        "hdd info       : %s\n" % (str(harddiskmanager.HDDList())),
        "network information : \n%s\n" % (command("ifconfig -a"))
    ]
    f = open("/tmp/machine.info", 'w')
    f.writelines(information)
    f.close()
コード例 #13
0
ファイル: SoftwareTools.py プロジェクト: aitchala/enigma2
 def __init__(self):
     aboutInfo = about.getImageVersionString()
     if aboutInfo.startswith("dev-"):
         self.ImageVersion = 'Experimental'
     else:
         self.ImageVersion = 'Stable'
     self.language = language.getLanguage(
     )[:2]  # getLanguage returns e.g. "fi_FI" for "language_country"
     DreamInfoHandler.__init__(self,
                               self.statusCallback,
                               blocking=False,
                               neededTag='ALL_TAGS',
                               neededFlag=self.ImageVersion)
     self.directory = resolveFilename(SCOPE_METADIR)
     self.hardware_info = HardwareInfo()
     self.list = List([])
     self.NotifierCallback = None
     self.Console = Console()
     self.UpdateConsole = Console()
     self.UpgradeConsole = Console()
     self.cmdList = []
     self.unwanted_extensions = ('-dbg', '-dev', '-doc', '-staticdev')
     self.reboot_required_packages = ('dreambox-dvb-modules', 'kernel-')
     self.ipkg = IpkgComponent()
     self.ipkg.addCallback(self.ipkgCallback)
コード例 #14
0
 def __init__(self, session, menu_path=''):
     Screen.__init__(self, session)
     self.timer = eTimer()
     screentitle = _('Streaming clients info')
     menu_path += screentitle
     if config.usage.show_menupath.value == 'large':
         title = menu_path
         self['menu_path_compressed'] = StaticText('')
     elif config.usage.show_menupath.value == 'small':
         title = screentitle
         self['menu_path_compressed'] = StaticText(
             menu_path.endswith(' / ') or menu_path +
             ' >' if 1 else menu_path[:-3] + ' >' or '')
     else:
         title = screentitle
         self['menu_path_compressed'] = StaticText('')
     Screen.setTitle(self, title)
     self['ScrollLabel'] = ScrollLabel()
     self['lab1'] = Label(_('EGAMI %s') % about.getImageVersionString())
     self['key_red'] = Button(_('Close'))
     self['key_blue'] = Button()
     self['actions'] = ActionMap(
         ['ColorActions', 'SetupActions', 'DirectionActions'], {
             'cancel': self.exit,
             'ok': self.exit,
             'red': self.exit,
             'blue': self.stopStreams,
             'up': self['ScrollLabel'].pageUp,
             'down': self['ScrollLabel'].pageDown
         })
     self.onLayoutFinish.append(self.start)
コード例 #15
0
 def getinfo(self):
     self.list.append(['Image', compabout.getImageVersionString()])
     self.list.append(['Enigma', compabout.getEnigmaVersionString()])
     self.list.append(['Model', getiteminfo('hostname')])
     info = getiteminfo('drivers')
     info = info.replace('dreambox-dvb-modules', '')
     self.list.append(['dvb-modules', info])
     info = getiteminfo('kernel')
     a = info.split('(')
     if len(a) > 1:
         info = a[0]
     self.list.append(['linux version', info])
     self.list.append(['second stage', getiteminfo('2stage')])
     self.list.append(['up Time', getiteminfo('uptime')])
     info = getiteminfo('mac')
     b = info.split('HWaddr')
     if len(b) > 1:
         info = b[1]
     self.list.append(['mac address', info])
     info = getiteminfo('ip')
     c = info.split(' ')
     if len(c) > 1:
         info = c[1]
     info = info.replace('addr', '')
     self.list.append(['ip address', info])
     self.ListToMulticontent()
コード例 #16
0
ファイル: About.py プロジェクト: kingvuplus/EGAMI-G
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent=parent)
     EGAMIVersion = _("EGAMI %s") % about.getImageVersionString()
     self["selected"] = Label(EGAMIVersion)
     AboutText = _("Model: %s %s\n") % (getMachineBrand(), getMachineName())
     if path.exists("/proc/stb/info/chipset"):
         chipset = open("/proc/stb/info/chipset", "r").read()
         AboutText += _("Chipset: BCM%s") % chipset.replace("\n", "") + "\n"
     AboutText += _("Version: %s") % getImageVersion() + "\n"
     AboutText += _("Build: %s") % getImageVersion() + "\n"
     AboutText += _("Kernel: %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: %s") % driversdate + "\n"
     AboutText += _("Last update: %s") % getEnigmaVersionString() + "\n\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"
     self["AboutText"] = StaticText(AboutText)
コード例 #17
0
 def getlog(self):
     if not path.exists('/tmp/' + self.logtype + '-git.log'):
         import urllib
         sourcefile = 'http://enigma2.world-of-satellite.com/feeds/' + about.getImageVersionString(
         ) + '/' + self.logtype + '-git.log'
         sourcefile, headers = urllib.urlretrieve(sourcefile)
         rename(sourcefile, '/tmp/' + self.logtype + '-git.log')
     fd = open('/tmp/' + self.logtype + '-git.log', 'r')
     releasenotes = fd.read()
     fd.close()
     releasenotes = releasenotes.replace('\nopenvix: build',
                                         "\n\nopenvix: build")
     releasenotes = releasenotes.split('\n\n')
     ver = 0
     releasever = releasenotes[int(ver)].split('\n')
     releasever = releasever[0].split(' ')
     releasever = releasever[2].replace(':', "")
     viewrelease = ""
     while int(releasever) > int(about.getBuildVersionString()):
         viewrelease += releasenotes[int(ver)] + '\n\n'
         ver += 1
         releasever = releasenotes[int(ver)].split('\n')
         releasever = releasever[0].split(' ')
         releasever = releasever[2].replace(':', "")
     self["text"].setText(viewrelease)
     summarytext = viewrelease.split(':\n')
     try:
         self['title_summary'].setText(summarytext[0] + ':')
         self['text_summary'].setText(summarytext[1])
     except:
         self['title_summary'].setText("")
         self['text_summary'].setText("")
コード例 #18
0
 def ipkgCallback(self, event, param):
     if event == IpkgComponent.EVENT_DONE:
         if self.updating:
             self.updating = False
             self.ipkg.startCmd(IpkgComponent.CMD_UPGRADE_LIST)
         elif self.ipkg.currentCommand == IpkgComponent.CMD_UPGRADE_LIST:
             self.total_packages = len(self.ipkg.getFetchedList())
             print('[OnlineVersionCheck] %s Updates available' %
                   self.total_packages)
             if self.total_packages:
                 from urllib import urlopen
                 import socket
                 currentTimeoutDefault = socket.getdefaulttimeout()
                 socket.setdefaulttimeout(3)
                 config.softwareupdate.updatefound.setValue(True)
                 try:
                     config.softwareupdate.updateisunstable.setValue(
                         urlopen(
                             "http://enigma2.world-of-satellite.com/feeds/"
                             + about.getImageVersionString() +
                             "/status").read())
                 except:
                     config.softwareupdate.updateisunstable.setValue(1)
                 socket.setdefaulttimeout(currentTimeoutDefault)
             else:
                 config.softwareupdate.updatefound.setValue(False)
         else:
             config.softwareupdate.updatefound.setValue(False)
     pass
コード例 #19
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Network Information"))
        self.skinName = ["SystemNetworkInfo", "About"]

        OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString()
        self["OpenNFRVersion"] = Label(OpenNFRVersion)

        self["LabelBSSID"] = StaticText()
        self["LabelESSID"] = StaticText()
        self["LabelQuality"] = StaticText()
        self["LabelSignal"] = StaticText()
        self["LabelBitrate"] = StaticText()
        self["LabelEnc"] = StaticText()
        self["LabelChannel"] = StaticText(_('Channel:'))
        self["LabelEncType"] = StaticText(_('Encryption Type:'))
        self["LabelFrequency"] = StaticText(_('Frequency:'))
        self["LabelFrequencyNorm"] = StaticText(_('Frequency Norm:'))
        self["BSSID"] = StaticText()
        self["ESSID"] = StaticText()
        self["quality"] = StaticText()
        self["signal"] = StaticText()
        self["bitrate"] = StaticText()
        self["enc"] = StaticText()
        self["channel"] = StaticText()
        self["encryption_type"] = StaticText()
        self["frequency"] = StaticText()
        self["frequency_norm"] = StaticText()

        self["IFtext"] = StaticText()
        self["IF"] = StaticText()
        self["Statustext"] = StaticText()
        self["statuspic"] = MultiPixmap()
        self["statuspic"].setPixmapNum(1)
        self["statuspic"].hide()

        self.iface = None
        self.createscreen()
        self.iStatus = None

        if iNetwork.isWirelessInterface(self.iface):
            try:
                from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus

                self.iStatus = iStatus
            except:
                pass
            self.resetList()
            self.onClose.append(self.cleanup)
        self.updateStatusbar()

        self["key_red"] = StaticText(_("Close"))

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
コード例 #20
0
    def startRun(self):
        listsize = self["list"].instance.size()
        self["list"].instance.hide()
        self.listWidth = listsize.width()
        self.listHeight = listsize.height()

        if self.type == self.DOWNLOAD:
            currentTimeoutDefault = socket.getdefaulttimeout()
            socket.setdefaulttimeout(3)
            try:
                config.softwareupdate.updateisunstable.setValue(
                    urlopen("http://enigma2.world-of-satellite.com/feeds/" +
                            about.getImageVersionString() + "/status").read())
            except:
                config.softwareupdate.updateisunstable.setValue(1)
            socket.setdefaulttimeout(currentTimeoutDefault)

            if config.softwareupdate.updateisunstable.getValue(
            ) == '1' and config.softwareupdate.updatebeta.getValue():
                self["text"].setText(
                    _("WARNING: feeds maybe unstable.") + '\n' +
                    _("Downloading plugin information. Please wait..."))
                self.container.execute(self.ipkg + " update")
            elif config.softwareupdate.updateisunstable.getValue(
            ) == '1' and not config.softwareupdate.updatebeta.getValue():
                self["text"].setText(
                    _("Sorry feeds seem be in an unstable state, if you wish to use them please enable 'Allow unstable updates' in online update setup."
                      ))
            else:
                self.container.execute(self.ipkg + " update")
        elif self.type == self.REMOVE:
            self.run = 1
            self.startIpkgListInstalled()
コード例 #21
0
ファイル: About.py プロジェクト: 4doe/enigma2-old
	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"

		# [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
			})
コード例 #22
0
 def createSatellitesXMLfile(self, tp_list, save_xml_dir):
     pos = self.orb_position
     if pos > 1800:
         pos -= 3600
     if pos < 0:
         pos_name = '%dW' % (abs(int(pos)) / 10)
     else:
         pos_name = '%dE' % (abs(int(pos)) / 10)
     location = '%s/blindscan_%s_%s.xml' % (save_xml_dir, pos_name,
                                            strftime("%d-%m-%Y_%H-%M-%S"))
     tuner = ['A', 'B', 'C']
     polarisation = [
         'horizontal', 'vertical', 'circular left', 'circular right',
         'vertical and horizontal', 'circular right and circular left'
     ]
     adjacent = [
         'no', 'up to 1 degree', 'up to 2 degrees', 'up to 3 degrees'
     ]
     known_txp = 'no'
     if self.filter_off_adjacent_satellites.value:
         known_txp = 'yes'
     xml = ['<?xml version="1.0" encoding="iso-8859-1"?>\n\n']
     xml.append('<!--\n')
     xml.append('	File created on %s\n' %
                (strftime("%A, %d of %B %Y, %H:%M:%S")))
     xml.append('	using %s receiver running VIX image, version %s,\n' %
                (config.misc.boxtype.value, about.getImageVersionString()))
     xml.append(
         '	build %s, with the blindscan plugin updated by Huevos\n\n' %
         (about.getBuildVersionString()))
     xml.append('	Search parameters:\n')
     xml.append('		Tuner: %s\n' % (tuner[self.feid]))
     xml.append('		Satellite: %s\n' % (self.sat_name))
     xml.append('		Start frequency: %dMHz\n' %
                (self.blindscan_start_frequency.value))
     xml.append('		Stop frequency: %dMHz\n' %
                (self.blindscan_stop_frequency.value))
     xml.append('		Polarization: %s\n' %
                (polarisation[self.scan_sat.polarization.value]))
     xml.append('		Lower symbol rate: %d\n' %
                (self.blindscan_start_symbol.value * 1000))
     xml.append('		Upper symbol rate: %d\n' %
                (self.blindscan_stop_symbol.value * 1000))
     xml.append('		Only save unknown tranponders: %s\n' % (known_txp))
     xml.append('		Filter out adjacent satellites: %s\n' %
                (adjacent[self.filter_off_adjacent_satellites.value]))
     xml.append('-->\n\n')
     xml.append('<satellites>\n')
     xml.append('	<sat name="%s" flags="0" position="%s">\n' %
                (self.sat_name, self.orb_position))
     for tp in tp_list:
         xml.append(
             '		<transponder frequency="%d" symbol_rate="%d" polarization="%d" fec_inner="%d" system="%d" modulation="%d"/>\n'
             % (tp.frequency, tp.symbol_rate, tp.polarisation, tp.fec,
                tp.system, tp.modulation))
     xml.append('	</sat>\n')
     xml.append('</satellites>')
     open(location, "w").writelines(xml)
     return location
コード例 #23
0
ファイル: SoftwareUpdate.py プロジェクト: conchobair/enigma2
	def checkNetworkStateFinished(self, result, retval,extra_args=None):
		if (float(about.getImageVersionString()) < 3.0 and result.find('mipsel/Packages.gz, wget returned 1') != -1) or (float(about.getImageVersionString()) >= 3.0 and result.find('mips32el/Packages.gz, wget returned 1') != -1):
			self.session.openWithCallback(self.close, MessageBox, _("Sorry feeds are down for maintenance, please try again later."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
		elif result.find('bad address') != -1:
			self.session.openWithCallback(self.close, MessageBox, _("Your STB_BOX is not connected to the internet, please check your network settings and try again."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
		elif result.find('Collected errors') != -1:
			self.session.openWithCallback(self.close, MessageBox, _("A background update check is is progress, please wait a few minutes and try again."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
		else:
			self.startCheck()
コード例 #24
0
ファイル: About.py プロジェクト: magic-merlin/dvbapp2-gui
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		
		self["selected"] = StaticText("About")
		self["BoxType"] = StaticText(_("Hardware: "))
		self["KernelVersion"] = StaticText(_("Kernel:") + " " + about.getKernelVersionString())
		self["ImageType"] = StaticText(_("Image:") + " " + about.getImageTypeString())
		self["ImageVersion"] = StaticText(_("Version:") + " " + about.getImageVersionString())
		self["EnigmaVersion"] = StaticText(_("Last Update:"))
コード例 #25
0
ファイル: TSGeneralInfo.py プロジェクト: vuteam/ts-gui
 def __init__(self, session):
     Screen.__init__(self, session)
     model = self.getCmdOutput('cat /proc/stb/info/vumodel')
     self['VuplusModel'] = Label('Vuplus:\t\t %s' % model)
     self.enigmaVersion_text = 'Enigma2 Version:\t\t ' + about.getEnigmaVersionString(
     )
     self['EnigmaVersion'] = Label(self.enigmaVersion_text)
     self['ImageVersion'] = Label('Image:\t\t ' +
                                  about.getImageVersionString())
     fp_version = None
     if fp_version is None:
         fp_version = ''
     else:
         fp_version = _('FP version:\t\t %d') % fp_version
     self['FPVersion'] = Label(fp_version)
     self['TSPanel'] = Label('TSPanel Version:\t\t %s' % '--------')
     self['DVBModules'] = Label('DVB-Modules:\t\t %s' % '--------')
     kernel = self.getCmdOutput('uname -r')
     self['Kernel'] = Label('Kernel:\t\t %s' % kernel)
     mac = self.getCmdOutput("ifconfig | grep HWaddr | awk '{print$5}'")
     ip = self.getCmdOutput("ifconfig | grep addr: | awk 'NR==1 {print$2}'")
     if ip == 'addr:127.0.0.1':
         ip = self.getCmdOutput(
             "ifconfig | grep addr: | awk 'NR==2 {print$2}'")
         if ip == '':
             self.NetAdapter_text = 'Network Adapter:\t\t Disabled'
             ip = '--------'
             mac = '--------'
         else:
             tmp = self.getCmdOutput('ifconfig | grep ppp')
             if tmp == '':
                 self.NetAdapter_text = 'Network Adapter:\t\t WLAN'
             else:
                 self.NetAdapter_text = 'Network Adapter:\t\t PPP'
     else:
         self.NetAdapter_text = 'Network Adapter:\t\t LAN'
     self['NetworkAdapter'] = Label(self.NetAdapter_text)
     ip = ip.replace('addr:', '')
     self['IPAddress'] = Label('IP-Address:\t\t %s' % ip)
     self['MACAddress'] = Label('MAC-Address:\t\t %s' % mac)
     uptime_sec = float(
         self.getCmdOutput("cat /proc/uptime | awk '{print$1}'"))
     uptime = self.parse_time(uptime_sec)
     self['Uptime'] = Label('Uptime:\t\t %s' % uptime)
     self['key_red'] = Button(_('Close'))
     self['setupActions'] = ActionMap(['SetupActions'], {
         'ok': self.cancel,
         'cancel': self.cancel,
         'red': self.cancel
     })
     self.onShown.append(self.setWindowTitle)
     self.onLayoutFinish.append(self.loadDriverVU)
     return
コード例 #26
0
	def __init__(self, session):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Network Information"))
		self.skinName = ["SystemNetworkInfo", "About"]
		
		OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString()
		self["OpenNFRVersion"] = Label(OpenNFRVersion)
		
		self["LabelBSSID"] = StaticText()
		self["LabelESSID"] = StaticText()
		self["LabelQuality"] = StaticText()
		self["LabelSignal"] = StaticText()
		self["LabelBitrate"] = StaticText()
		self["LabelEnc"] = StaticText()
		self["BSSID"] = StaticText()
		self["ESSID"] = StaticText()
		self["quality"] = StaticText()
		self["signal"] = StaticText()
		self["bitrate"] = StaticText()
		self["enc"] = StaticText()

		self["IFtext"] = StaticText()
		self["IF"] = StaticText()
		self["Statustext"] = StaticText()
		self["statuspic"] = MultiPixmap()
		self["statuspic"].setPixmapNum(1)
		self["statuspic"].hide()

		self.iface = None
		self.createscreen()
		self.iStatus = None

		if iNetwork.isWirelessInterface(self.iface):
			try:
				from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus

				self.iStatus = iStatus
			except:
				pass
			self.resetList()
			self.onClose.append(self.cleanup)
		self.updateStatusbar()

		self["key_red"] = StaticText(_("Close"))

		self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"],
									{
										"cancel": self.close,
										"ok": self.close,
										"up": self["AboutScrollLabel"].pageUp,
										"down": self["AboutScrollLabel"].pageDown
									})
コード例 #27
0
 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)
コード例 #28
0
ファイル: About.py プロジェクト: st7TEAM/dreambox
	def __init__(self, session):
		Screen.__init__(self, session)

		self["EnigmaVersion"] = StaticText("Enigma2: " + 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: %d") % fp_version

		self["FPVersion"] = StaticText(fp_version)

		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		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["IPHeader"] = StaticText(_("Current IP Address:"))
		iNetwork = resourcemanager.getResource("iNetwork")
		ifaces = iNetwork.getConfiguredAdapters()
		convertIP = lambda l: "%s.%s.%s.%s" % tuple(l) if l and len(l) == 4 else "0.0.0.0"
		ipA = _("none")
		if len(ifaces) > 0:
			iface = ifaces[0]
			ip = iNetwork.getAdapterAttribute(iface, "ip")
			name = iNetwork.getFriendlyAdapterName(iface)
			if ip != None:
				ipA = "%s (%s)" %(convertIP(ip), name)
		self["ipA"] = StaticText(ipA)

		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo
			})
コード例 #29
0
ファイル: About.py プロジェクト: kingvuplus/eg-e2
 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
コード例 #30
0
	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)
コード例 #31
0
ファイル: About.py プロジェクト: popazerty/12
	def __init__(self, session):
		Screen.__init__(self, session)

		self["EnigmaVersion"] = StaticText("Dreambox OS: " + 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: %d") % fp_version

		self["FPVersion"] = StaticText(fp_version)

		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		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["IPHeader"] = StaticText(_("Current IP Address:"))

		ipA = _("none")
		services = eNetworkManager.getInstance().getServices()
		for service in services:
			ip = self.getServiceIP(service)
			name = service.name()
			if ip != None:
				ipA = "%s (%s)" %(ip, name)
		self["ipA"] = StaticText(ipA)
		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo
			})
コード例 #32
0
ファイル: About.py プロジェクト: kingvuplus/EGAMI-G
 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)
コード例 #33
0
ファイル: About.py プロジェクト: ostende/EGAMI-2
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _('Network Information'))
        self.skinName = ['SystemNetworkInfo', 'WlanStatus']
        EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
        self['lab1'] = Label(EGAMIVersion)
        self['LabelBSSID'] = StaticText()
        self['LabelESSID'] = StaticText()
        self['LabelQuality'] = StaticText()
        self['LabelSignal'] = StaticText()
        self['LabelBitrate'] = StaticText()
        self['LabelEnc'] = StaticText()
        self['BSSID'] = StaticText()
        self['ESSID'] = StaticText()
        self['quality'] = StaticText()
        self['signal'] = StaticText()
        self['bitrate'] = StaticText()
        self['enc'] = StaticText()
        self['IFtext'] = StaticText()
        self['IF'] = StaticText()
        self['Statustext'] = StaticText()
        self['statuspic'] = MultiPixmap()
        self['statuspic'].setPixmapNum(1)
        self['statuspic'].show()
        self.iface = None
        self.createscreen()
        self.iStatus = None
        if iNetwork.isWirelessInterface(self.iface):
            try:
                from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus
                self.iStatus = iStatus
            except:
                pass

            self.resetList()
            self.onClose.append(self.cleanup)
        self.updateStatusbar()
        self['key_red'] = StaticText(_('Close'))
        self['actions'] = ActionMap(
            ['SetupActions', 'ColorActions', 'DirectionActions'], {
                'cancel': self.close,
                'ok': self.close,
                'up': self['AboutScrollLabel'].pageUp,
                'down': self['AboutScrollLabel'].pageDown
            })
        return
コード例 #34
0
ファイル: SoftwareTools.py プロジェクト: 0sc0d3r/enigma2-1
	def __init__(self):
		aboutInfo = about.getImageVersionString()
		if aboutInfo.startswith("dev-"):
			self.ImageVersion = 'Experimental'
		else:
			self.ImageVersion = 'Stable'
		self.language = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
		PackageInfoHandler.__init__(self, self.statusCallback, blocking = False, neededTag = 'ALL_TAGS', neededFlag = self.ImageVersion)
		self.directory = resolveFilename(SCOPE_METADIR)
		self.list = List([])
		self.NotifierCallback = None
		self.Console = Console()
		self.UpdateConsole = Console()
		self.cmdList = []
		self.unwanted_extensions = ('-dbg', '-dev', '-doc', '-staticdev', '-src')
		self.ipkg = IpkgComponent()
		self.ipkg.addCallback(self.ipkgCallback)
コード例 #35
0
ファイル: PluginBrowser.py プロジェクト: conchobair/enigma2
	def dataAvail(self, str):
		if self.type == self.DOWNLOAD and ((float(about.getImageVersionString()) < 3.0 and str.find('mipsel/Packages.gz, wget returned 1') != -1) or (float(about.getImageVersionString()) >= 3.0 and str.find('mips32el/Packages.gz, wget returned 1') != -1)):
			self.run = 3
			return


		#prepend any remaining data from the previous call
		str = self.remainingdata + str
		#split in lines
		lines = str.split('\n')
		#'str' should end with '\n', so when splitting, the last line should be empty. If this is not the case, we received an incomplete line
		if len(lines[-1]):
			#remember this data for next time
			self.remainingdata = lines[-1]
			lines = lines[0:-1]
		else:
			self.remainingdata = ""

		if self.check_settings:
			self.check_settings = False
			self.remove_settings_name = str.split(' - ')[0].replace(self.PLUGIN_PREFIX, '')
			self.session.openWithCallback(self.runSettingsRemove, MessageBox, _('You already have a channel list installed,\nwould you like to remove\n"%s"?') % self.remove_settings_name)
			return

		if self.check_bootlogo:
			self.check_bootlogo = False
			self.remove_bootlogo_name = str.split(' - ')[0].replace(self.PLUGIN_PREFIX, '')
			self.session.openWithCallback(self.runBootlogoRemove, MessageBox, _('You already have a bootlogo installed,\nwould you like to remove\n"%s"?') % self.remove_bootlogo_name)
			return

		for x in lines:
			plugin = x.split(" - ", 2)
			# 'opkg list_installed' only returns name + version, no description field
			if len(plugin) >= 2:
				if not plugin[0].endswith('-dev') and not plugin[0].endswith('-staticdev') and not plugin[0].endswith('-dbg') and not plugin[0].endswith('-doc'):
					if self.run == 1 and self.type == self.DOWNLOAD:
						if plugin[0] not in self.installedplugins:
							self.installedplugins.append(plugin[0])
					else:
						if plugin[0] not in self.installedplugins:
							if len(plugin) == 2:
								# 'opkg list_installed' does not return descriptions, append empty description
								plugin.append('')
							plugin.append(plugin[0][15:])

							self.pluginlist.append(plugin)
コード例 #36
0
ファイル: About.py プロジェクト: t5k6/openNFR-gui2
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Memory Information"))
        #self.skinName = ["SystemMemoryInfo", "About"]
        self.skinName = ["About"]

        OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString()
        self["OpenNFRVersion"] = Label(OpenNFRVersion)

        self["AboutScrollLabel"] = ScrollLabel()

        self["actions"] = ActionMap(["SetupActions", "ColorActions"], {
            "cancel": self.close,
            "ok": self.close,
        })

        out_lines = file("/proc/meminfo").readlines()
        self.AboutText = _("RAM") + '\n\n'
        RamTotal = "-"
        RamFree = "-"
        for lidx in range(len(out_lines) - 1):
            tstLine = out_lines[lidx].split()
            if "MemTotal:" in tstLine:
                MemTotal = out_lines[lidx].split()
                self.AboutText += _(
                    "Total Memory:") + "\t" + MemTotal[1] + "\n"
            if "MemFree:" in tstLine:
                MemFree = out_lines[lidx].split()
                self.AboutText += _("Free Memory:") + "\t" + MemFree[1] + "\n"
            if "Buffers:" in tstLine:
                Buffers = out_lines[lidx].split()
                self.AboutText += _("Buffers:") + "\t" + Buffers[1] + "\n"
            if "Cached:" in tstLine:
                Cached = out_lines[lidx].split()
                self.AboutText += _("Cached:") + "\t" + Cached[1] + "\n"
            if "SwapTotal:" in tstLine:
                SwapTotal = out_lines[lidx].split()
                self.AboutText += _("Total Swap:") + "\t" + SwapTotal[1] + "\n"
            if "SwapFree:" in tstLine:
                SwapFree = out_lines[lidx].split()
                self.AboutText += _("Free Swap:") + "\t" + SwapFree[1] + "\n\n"

        self.Console = Console()
        self.Console.ePopen("df -mh / | grep -v '^Filesystem'",
                            self.Stage1Complete)
コード例 #37
0
ファイル: About.py プロジェクト: ostende/EGAMI-2
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _('Memory Information'))
        self.skinName = ['SystemMemoryInfo', 'About']
        self['AboutScrollLabel'] = ScrollLabel()
        EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
        self['lab1'] = Label(EGAMIVersion)
        self['lab2'] = StaticText()
        self['actions'] = ActionMap(
            ['SetupActions', 'ColorActions'], {
                'cancel': self.close,
                'ok': self.close,
                'up': self['AboutScrollLabel'].pageUp,
                'down': self['AboutScrollLabel'].pageDown
            })
        out_lines = file('/proc/meminfo').readlines()
        self.AboutText = _('RAM') + '\n\n'
        RamTotal = '-'
        RamFree = '-'
        for lidx in range(len(out_lines) - 1):
            tstLine = out_lines[lidx].split()
            if 'MemTotal:' in tstLine:
                MemTotal = out_lines[lidx].split()
                self.AboutText += _(
                    'Total memory:') + '\t' + MemTotal[1] + '\n'
            if 'MemFree:' in tstLine:
                MemFree = out_lines[lidx].split()
                self.AboutText += _('Free memory:') + '\t' + MemFree[1] + '\n'
            if 'Buffers:' in tstLine:
                Buffers = out_lines[lidx].split()
                self.AboutText += _('Buffers:') + '\t' + Buffers[1] + '\n'
            if 'Cached:' in tstLine:
                Cached = out_lines[lidx].split()
                self.AboutText += _('Cached:') + '\t' + Cached[1] + '\n'
            if 'SwapTotal:' in tstLine:
                SwapTotal = out_lines[lidx].split()
                self.AboutText += _('Total swap:') + '\t' + SwapTotal[1] + '\n'
            if 'SwapFree:' in tstLine:
                SwapFree = out_lines[lidx].split()
                self.AboutText += _('Free swap:') + '\t' + SwapFree[1] + '\n\n'

        self['actions'].setEnabled(False)
        self.Console = Console()
        self.Console.ePopen("df -mh / | grep -v '^Filesystem'",
                            self.Stage1Complete)
コード例 #38
0
ファイル: About.py プロジェクト: kingvuplus/EG-gui2-1
 def __init__(self, session):
     Screen.__init__(self, session)
     Screen.setTitle(self, _('Device Information'))
     self.skinName = ['SystemDevicesInfo', 'Devices']
     EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
     self['lab1'] = Label(EGAMIVersion)
     self['TunerHeader'] = StaticText(_('Detected Tuners:'))
     self['HDDHeader'] = StaticText(_('Detected Devices:'))
     self['MountsHeader'] = StaticText(_('Network Servers:'))
     self['nims'] = StaticText()
     self['hdd'] = StaticText()
     self['mounts'] = StaticText()
     self.list = []
     self.activityTimer = eTimer()
     self.activityTimer.timeout.get().append(self.populate2)
     self['actions'] = ActionMap(['SetupActions', 'ColorActions', 'TimerEditActions'], {'cancel': self.close,
      'ok': self.close})
     self.onLayoutFinish.append(self.populate)
コード例 #39
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Installed Networkplugins"))
        self.skinName = ["SystemNetworkInfo", "About"]

        OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString()
        self["OpenNFRVersion"] = Label(OpenNFRVersion)

        self["AboutScrollLabel"] = ScrollLabel()

        self["actions"] = ActionMap(["SetupActions", "ColorActions"], {
            "cancel": self.close,
            "ok": self.close,
        })

        self.AboutText = _(
            "List of Networkplugins with Installedinfo") + '\n\n'
        self.InstallCheck()
コード例 #40
0
ファイル: About.py プロジェクト: magic-merlin/dvbapp2-gui
	def __init__(self, session):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Memory Information"))
		#self.skinName = ["SystemMemoryInfo", "About"]
		self.skinName = ["About"]
		magicVersion = "magic " + about.getImageVersionString()
		
		self["magicVersion"] = Label(magicVersion)
		
		self["AboutScrollLabel"] = ScrollLabel()

		self["actions"] = ActionMap(["SetupActions", "ColorActions", "TimerEditActions"],
			{
				"cancel": self.close,
				"ok": self.close,
			})

		out_lines = file("/proc/meminfo").readlines()
		self.AboutText = _("RAM") + '\n\n'
		RamTotal = "-"
		RamFree = "-"
		for lidx in range(len(out_lines)-1):
			tstLine = out_lines[lidx].split()
			if "MemTotal:" in tstLine:
				MemTotal = out_lines[lidx].split()
				self.AboutText += _("Total Memory:") + "\t" + MemTotal[1] + "\n"
			if "MemFree:" in tstLine:
				MemFree = out_lines[lidx].split()
				self.AboutText += _("Free Memory:") + "\t" + MemFree[1] + "\n"
			if "Buffers:" in tstLine:
				Buffers = out_lines[lidx].split()
				self.AboutText += _("Buffers:") + "\t" + Buffers[1] + "\n"
			if "Cached:" in tstLine:
				Cached = out_lines[lidx].split()
				self.AboutText += _("Cached:") + "\t" + Cached[1] + "\n"
			if "SwapTotal:" in tstLine:
				SwapTotal = out_lines[lidx].split()
				self.AboutText += _("Total Swap:") + "\t" + SwapTotal[1] + "\n"
			if "SwapFree:" in tstLine:
				SwapFree = out_lines[lidx].split()
				self.AboutText += _("Free Swap:") + "\t" + SwapFree[1] + "\n\n"

		self.Console = Console()
		self.Console.ePopen("df -mh / | grep -v '^Filesystem'", self.Stage1Complete)
コード例 #41
0
ファイル: About.py プロジェクト: n3wb13/OpenNfrGui-5.0-1
	def __init__(self, session):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Device Information"))
		self.skinName = ["SystemDevicesInfo", "About"]
		
		OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString()
		self["OpenNFRVersion"] = Label(OpenNFRVersion)
		
		self.AboutText = ""
		self["AboutScrollLabel"] = ScrollLabel(self.AboutText)
		self.activityTimer = eTimer()
		self.activityTimer.timeout.get().append(self.populate2)
		self.populate()

		self["actions"] = ActionMap(["SetupActions", "ColorActions", "TimerEditActions"],
			{
				"cancel": self.close,
				"ok": self.close,
			})
コード例 #42
0
ファイル: About.py プロジェクト: kingvuplus/eg-e2
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _('Network Information'))
        self.skinName = ['SystemNetworkInfo', 'WlanStatus']
        EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
        self['lab1'] = Label(EGAMIVersion)
        self['LabelBSSID'] = StaticText()
        self['LabelESSID'] = StaticText()
        self['LabelQuality'] = StaticText()
        self['LabelSignal'] = StaticText()
        self['LabelBitrate'] = StaticText()
        self['LabelEnc'] = StaticText()
        self['BSSID'] = StaticText()
        self['ESSID'] = StaticText()
        self['quality'] = StaticText()
        self['signal'] = StaticText()
        self['bitrate'] = StaticText()
        self['enc'] = StaticText()
        self['IFtext'] = StaticText()
        self['IF'] = StaticText()
        self['Statustext'] = StaticText()
        self['statuspic'] = MultiPixmap()
        self['statuspic'].setPixmapNum(1)
        self['statuspic'].show()
        self.iface = None
        self.createscreen()
        self.iStatus = None
        if iNetwork.isWirelessInterface(self.iface):
            try:
                from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus
                self.iStatus = iStatus
            except:
                pass

            self.resetList()
            self.onClose.append(self.cleanup)
        self.updateStatusbar()
        self['key_red'] = StaticText(_('Close'))
        self['actions'] = ActionMap(['SetupActions', 'ColorActions', 'DirectionActions'], {'cancel': self.close,
         'ok': self.close,
         'up': self['AboutScrollLabel'].pageUp,
         'down': self['AboutScrollLabel'].pageDown})
        return
コード例 #43
0
ファイル: About.py プロジェクト: kingvuplus/EGAMI-G
 def __init__(self, session):
     Screen.__init__(self, session)
     Screen.setTitle(self, _("Device Information"))
     self.skinName = ["SystemDevicesInfo", "Devices"]
     EGAMIVersion = _("EGAMI %s") % about.getImageVersionString()
     self["lab1"] = Label(EGAMIVersion)
     self["TunerHeader"] = StaticText(_("Detected Tuners:"))
     self["HDDHeader"] = StaticText(_("Detected Devices:"))
     self["MountsHeader"] = StaticText(_("Network Servers:"))
     self["nims"] = StaticText()
     self["hdd"] = StaticText()
     self["mounts"] = StaticText()
     self.list = []
     self.activityTimer = eTimer()
     self.activityTimer.timeout.get().append(self.populate2)
     self["actions"] = ActionMap(
         ["SetupActions", "ColorActions", "TimerEditActions"], {"cancel": self.close, "ok": self.close}
     )
     self.onLayoutFinish.append(self.populate)
コード例 #44
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Device Information"))
        self.skinName = ["SystemDevicesInfo", "About"]

        OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString()
        self["OpenNFRVersion"] = Label(OpenNFRVersion)

        self.AboutText = ""
        self["AboutScrollLabel"] = ScrollLabel(self.AboutText)
        self.activityTimer = eTimer()
        self.activityTimer.timeout.get().append(self.populate2)
        self.populate()

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "TimerEditActions"], {
                "cancel": self.close,
                "ok": self.close,
            })
コード例 #45
0
    def __init__(self, session):
        Screen.__init__(self, session)

        self["EnigmaVersion"] = StaticText("Enigma: " +
                                           about.getEnigmaVersionString())
        self["ImageVersion"] = StaticText("Evolution: " +
                                          about.getImageVersionString())

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %d") % fp_version

        self["FPVersion"] = StaticText(fp_version)

        nims = nimmanager.nimList()
        for count in (0, 1, 2, 3):
            if count < len(nims):
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")

        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["actions"] = ActionMap(
            ["SetupActions", "ColorActions"], {
                "cancel": self.close,
                "ok": self.close,
                "green": self.showTranslationInfo
            })
コード例 #46
0
ファイル: plugin.py プロジェクト: bigroma73/local
 def mainInfo(self):
     listnims = ""
     self["Hardware"].text = about.getHardwareTypeString()
     self["Image"].text = about.getImageTypeString()
     self["Kernel"].text = about.getKernelVersionString()
     self["EnigmaVersion"].text = about.getImageVersionString()
     nims = nimmanager.nimList()
     for count in range(len(nims)):
         if count < 4:
             listnims += "%s\n" % nims[count]
         else:
             listnims += "\n"
     self["nim"].text = listnims
     try:
         drv = os.popen("opkg info *-dvb-modules")
         for line in drv:
             if line.find("Version:") > -1:
                 self["driver"].text = line.split()[1]
         drv.close()
     except:
         self["driver"].text = " "
コード例 #47
0
 def __init__(self, session):
     Screen.__init__(self, session)
     Screen.setTitle(self, _('Device Information'))
     self.skinName = ['SystemDevicesInfo', 'Devices']
     EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
     self['lab1'] = Label(EGAMIVersion)
     self['TunerHeader'] = StaticText(_('Detected Tuners:'))
     self['HDDHeader'] = StaticText(_('Detected Devices:'))
     self['MountsHeader'] = StaticText(_('Network Servers:'))
     self['nims'] = StaticText()
     self['hdd'] = StaticText()
     self['mounts'] = StaticText()
     self.list = []
     self.activityTimer = eTimer()
     self.activityTimer.timeout.get().append(self.populate2)
     self['actions'] = ActionMap(
         ['SetupActions', 'ColorActions', 'TimerEditActions'], {
             'cancel': self.close,
             'ok': self.close
         })
     self.onLayoutFinish.append(self.populate)
コード例 #48
0
  def __GetUserAgent(self):
    
    agents = {}
    agents["ShareMyBox"] = VERSION

    
    if hasattr(os,'uname'):
      agents["ShareMyBox"] += ' (%s)' % str(os.uname()).replace('(','').replace(')','')
      
    try:
      from Components.About import about
      agents["Enigma2"] = about.getEnigmaVersionString()
      agents["Image"] = about.getImageVersionString()
    except:
      pass      

    self.__headers['User-Agent'] = ''      
    for key, value in agents.iteritems():
      self.__headers['User-Agent'] += '%s/"%s" ' % (key, value)
      
    self.__headers['User-Agent'] = self.__headers['User-Agent'].strip()
コード例 #49
0
ファイル: SoftwareUpdate.py プロジェクト: kolombek/enigma2
	def getlog(self):
		try:
			sourcefile = 'http://enigma2.world-of-satellite.com/feeds/' + about.getImageVersionString() + '/' + self.logtype + '-git.log'
			sourcefile,headers = urllib.urlretrieve(sourcefile)
			rename(sourcefile,'/tmp/' + self.logtype + '-git.log')
			fd = open('/tmp/' + self.logtype + '-git.log', 'r')
			releasenotes = fd.read()
			fd.close()
		except:
			releasenotes = '404 Not Found'
		if releasenotes.find('404 Not Found') == -1:
			releasenotes = releasenotes.replace('\nopenvix: build',"\n\nopenvix: build")
			releasenotes = releasenotes.split('\n\n')
			ver = -1
			releasever = ""
			viewrelease=""
			while not releasever.isdigit():
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split(' ')
				releasever = releasever[2].replace(':',"")

			while int(releasever) > int(about.getBuildVersionString()):
				viewrelease += releasenotes[int(ver)]+'\n\n'
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split(' ')
				releasever = releasever[2].replace(':',"")
			self["text"].setText(viewrelease)
			summarytext = viewrelease.split(':\n')
			try:
				self['title_summary'].setText(summarytext[0]+':')
				self['text_summary'].setText(summarytext[1])
			except:
				self['title_summary'].setText("")
				self['text_summary'].setText("")
		else:
			self['title_summary'].setText("")
			self['text_summary'].setText(_("Error downloading change log."))
			self['text'].setText(_("Error downloading change log."))
コード例 #50
0
    def __init__(self, session, destdir=None):
        Screen.__init__(self, session)

        self.box = HardwareInfo().get_device_name()
        self.usbmountpoint = "/mnt/usb/"

        self["key_red"] = StaticText()
        self["key_green"] = StaticText()
        self["key_yellow"] = StaticText()
        self["key_blue"] = StaticText()
        self.filelist = FileList(self.usbmountpoint,
                                 matchingPattern="^.*\.(nfi|NFI)",
                                 showDirectories=False,
                                 showMountpoints=False)
        self["filelist"] = self.filelist
        self["infolabel"] = StaticText()

        self["status"] = StaticText(
            _("Please select an NFI file and press green key to flash!") +
            '\n' + _("currently installed image: %s") %
            (about.getImageVersionString()))
        self.job = None

        self["shortcuts"] = ActionMap(
            [
                "OkCancelActions", "ColorActions", "ShortcutActions",
                "DirectionActions"
            ], {
                "ok": self.keyOk,
                "green": self.keyOk,
                "up": self.keyUp,
                "upRepeated": self.keyUp,
                "downRepeated": self.keyDown,
                "down": self.keyDown,
                "left": self.keyLeft,
                "yellow": self.reboot,
                "right": self.keyRight
            }, -1)
        self.md5sum = ""
        self.onShown.append(self.autostart)
コード例 #51
0
ファイル: flasher.py プロジェクト: Nobody28/stbgui
    def __init__(self, session, destdir=None):
        Screen.__init__(self, session)

        self.box = HardwareInfo().get_device_name()
        self.usbmountpoint = "/mnt/usb/"

        self["key_red"] = StaticText()
        self["key_green"] = StaticText()
        self["key_yellow"] = StaticText()
        self["key_blue"] = StaticText()
        self.filelist = FileList(
            self.usbmountpoint, matchingPattern="^.*\.(nfi|NFI)", showDirectories=False, showMountpoints=False
        )
        self["filelist"] = self.filelist
        self["infolabel"] = StaticText()

        self["status"] = StaticText(
            _("Please select an NFI file and press green key to flash!")
            + "\n"
            + _("currently installed image: %s") % (about.getImageVersionString())
        )
        self.job = None

        self["shortcuts"] = ActionMap(
            ["OkCancelActions", "ColorActions", "ShortcutActions", "DirectionActions"],
            {
                "ok": self.keyOk,
                "green": self.keyOk,
                "up": self.keyUp,
                "upRepeated": self.keyUp,
                "downRepeated": self.keyDown,
                "down": self.keyDown,
                "left": self.keyLeft,
                "yellow": self.reboot,
                "right": self.keyRight,
            },
            -1,
        )
        self.md5sum = ""
        self.onShown.append(self.autostart)
コード例 #52
0
ファイル: PluginBrowser.py プロジェクト: torac/enigma2
    def startRun(self):
        listsize = self["list"].instance.size()
        self["list"].instance.hide()
        self.listWidth = listsize.width()
        self.listHeight = listsize.height()

        if self.type == self.DOWNLOAD:
            currentTimeoutDefault = socket.getdefaulttimeout()
            socket.setdefaulttimeout(3)
            try:
                config.softwareupdate.updateisunstable.setValue(
                    urlopen(
                        "http://enigma2.world-of-satellite.com/feeds/" + about.getImageVersionString() + "/status"
                    ).read()
                )
            except:
                config.softwareupdate.updateisunstable.setValue(1)
            socket.setdefaulttimeout(currentTimeoutDefault)

            if config.softwareupdate.updateisunstable.getValue() == "1" and config.softwareupdate.updatebeta.getValue():
                self["text"].setText(
                    _("WARNING: feeds maybe unstable.") + "\n" + _("Downloading plugin information. Please wait...")
                )
                self.container.execute(self.ipkg + " update")
            elif (
                config.softwareupdate.updateisunstable.getValue() == "1"
                and not config.softwareupdate.updatebeta.getValue()
            ):
                self["text"].setText(
                    _(
                        "Sorry feeds seem be in an unstable state, if you wish to use them please enable 'Allow unstable updates' in online update setup."
                    )
                )
            else:
                self.container.execute(self.ipkg + " update")
        elif self.type == self.REMOVE:
            self.run = 1
            self.startIpkgListInstalled()
コード例 #53
0
ファイル: plugin.py プロジェクト: popazerty/bh1
def generateInformation():
	from os import popen
	from Tools.DreamboxHardware import getFPVersion
	from Components.Harddisk import harddiskmanager
	from Components.NimManager import nimmanager
	from Components.About import about
	def command(cmd):
		try:
			result = popen(cmd, "r").read().strip()
			return str(result)
		except:
			pass
	information = [
		 "kernel         : %s\n"%(command("uname -a"))
		,"version        : %s (%s)\n"%(str(about.getImageVersionString()), str(about.getEnigmaVersionString()))
		,"frontprocessor : %s\n"%(str(getFPVersion()))
		,"frontend       : %s\n"%(str(nimmanager.nimList()))
		,"hdd info       : %s\n"%(str(harddiskmanager.HDDList()))
		,"network information : \n%s\n"%(command("ifconfig -a"))
		]
	f = open("/tmp/machine.info", 'w')
	f.writelines(information)
	f.close()
コード例 #54
0
	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().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"
		
		FFmpegVersion = _("FFmpeg version: ") + about.getFFmpegVersionString()
コード例 #55
0
ファイル: About.py プロジェクト: kingvuplus/EG-gui2-1
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _('Memory Information'))
        self.skinName = ['SystemMemoryInfo', 'About']
        EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
        self['lab1'] = Label(EGAMIVersion)
        self['AboutScrollLabel'] = ScrollLabel()
        self['actions'] = ActionMap(['SetupActions', 'ColorActions'], {'cancel': self.close,
         'ok': self.close})
        out_lines = file('/proc/meminfo').readlines()
        self.AboutText = _('RAM') + '\n\n'
        RamTotal = '-'
        RamFree = '-'
        for lidx in range(len(out_lines) - 1):
            tstLine = out_lines[lidx].split()
            if 'MemTotal:' in tstLine:
                MemTotal = out_lines[lidx].split()
                self.AboutText += _('Total Memory:') + '\t' + MemTotal[1] + '\n'
            if 'MemFree:' in tstLine:
                MemFree = out_lines[lidx].split()
                self.AboutText += _('Free Memory:') + '\t' + MemFree[1] + '\n'
            if 'Buffers:' in tstLine:
                Buffers = out_lines[lidx].split()
                self.AboutText += _('Buffers:') + '\t' + Buffers[1] + '\n'
            if 'Cached:' in tstLine:
                Cached = out_lines[lidx].split()
                self.AboutText += _('Cached:') + '\t' + Cached[1] + '\n'
            if 'SwapTotal:' in tstLine:
                SwapTotal = out_lines[lidx].split()
                self.AboutText += _('Total Swap:') + '\t' + SwapTotal[1] + '\n'
            if 'SwapFree:' in tstLine:
                SwapFree = out_lines[lidx].split()
                self.AboutText += _('Free Swap:') + '\t' + SwapFree[1] + '\n\n'

        self['actions'].setEnabled(False)
        self.Console = Console()
        self.Console.ePopen("df -mh / | grep -v '^Filesystem'", self.Stage1Complete)
コード例 #56
0
ファイル: About.py プロジェクト: kingvuplus/nn-gui
	def __init__(self, session):
		Screen.__init__(self, session)

		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: %d") % fp_version

		self["FPVersion"] = StaticText(fp_version)

		nims = nimmanager.nimList()
		for count in (0, 1, 2, 3):
			if count < len(nims):
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")

		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["actions"] = ActionMap(["SetupActions", "ColorActions"], 
			{
				"cancel": self.close,
				"ok": self.close,
				"green": self.showTranslationInfo
			})
コード例 #57
0
ファイル: About.py プロジェクト: trunca/pena
    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
            })
コード例 #58
0
def getAllInfo():
    info = {}

    brand = "unknown"
    model = "unknown"
    procmodel = "unknown"
    grabpip = 0
    lcd = 0
    orgdream = 0
    if tpmloaded:
        orgdream = tpm_check()

    if fileExists("/proc/stb/info/hwmodel"):
        brand = "DAGS"
        f = open("/proc/stb/info/hwmodel", 'r')
        procmodel = f.readline().strip()
        f.close()
        if (procmodel.startswith("optimuss")
                or procmodel.startswith("pingulux")):
            brand = "Edision"
            model = procmodel.replace("optimmuss", "Optimuss ").replace(
                "plus", " Plus").replace(" os", " OS")
        elif (procmodel.startswith("fusion") or procmodel.startswith("purehd")
              or procmodel.startswith("revo4k")
              or procmodel.startswith("galaxy4k")):
            brand = "Xsarius"
            if procmodel == "fusionhd":
                model = procmodel.replace("fusionhd", "Fusion HD")
            elif procmodel == "fusionhdse":
                model = procmodel.replace("fusionhdse", "Fusion HD SE")
            elif procmodel == "purehd":
                model = procmodel.replace("purehd", "Pure HD")
            elif procmodel == "purehdse":
                model = procmodel.replace("purehdse", "Pure HD SE")
            elif procmodel == "revo4k":
                model = procmodel.replace("revo4k", "Revo4K")
            elif procmodel == "galaxy4k":
                model = procmodel.replace("galaxy4k", "Galaxy4K")
        elif (procmodel.startswith("lunix")):
            brand = "Qviart"
            if procmodel == "lunix3-4k":
                model = procmodel.replace("lunix3-4k", "Lunix3-4K")
            elif procmodel == "lunix":
                model = procmodel.replace("lunix", "Lunix")
            if procmodel == "lunix4k":
                model = procmodel.replace("lunix4k", "Lunix4K")
    elif fileExists("/proc/stb/info/azmodel"):
        brand = "AZBox"
        f = open("/proc/stb/info/model",
                 'r')  # To-Do: Check if "model" is really correct ...
        procmodel = f.readline().strip()
        f.close()
        model = procmodel.lower()
    elif fileExists("/proc/stb/info/gbmodel"):
        brand = "GigaBlue"
        f = open("/proc/stb/info/gbmodel", 'r')
        procmodel = f.readline().strip()
        f.close()
        if procmodel == "GBQUAD PLUS":
            model = procmodel.replace("GBQUAD",
                                      "Quad").replace("PLUS", " Plus")
        elif procmodel == "gbquad4k":
            model = procmodel.replace("gbquad4k", "UHD Quad 4k")
        elif procmodel == "quad4k":
            model = procmodel.replace("quad4k", "UHD Quad 4k")
        elif procmodel == "gbue4k":
            model = procmodel.replace("gbue4k", "UHD UE 4k")
        elif procmodel == "ue4k":
            model = procmodel.replace("ue4k", "UHD UE 4k")
        elif procmodel == "gbtrio4k":
            model = procmodel.replace("gbtrio4k", "UHD Trio 4k")
    elif fileExists("/proc/stb/info/vumodel"
                    ) and not fileExists("/proc/stb/info/boxtype"):
        brand = "Vu+"
        f = open("/proc/stb/info/vumodel", 'r')
        procmodel = f.readline().strip()
        f.close()
        model = procmodel.title().replace("olose", "olo SE").replace(
            "olo2se", "olo2 SE").replace("2", "²").replace("4Kse", "4K SE")
        if not procmodel.startswith("vu"):
            procmodel = "vu%s" % procmodel
    elif fileExists("/proc/boxtype"):
        f = open("/proc/boxtype", 'r')
        procmodel = f.readline().strip().lower()
        f.close()
        if procmodel in ("adb2850", "adb2849", "bska", "bsla", "bxzb", "bzzb"):
            brand = "Advanced Digital Broadcast"
            if procmodel in ("bska", "bxzb"):
                model = "ADB 5800S"
            elif procmodel in ("bsla", "bzzb"):
                model = "ADB 5800SX"
            elif procmodel == "adb2849":
                model = "ADB 2849ST"
            else:
                model = "ADB 2850ST"
        elif procmodel in ("esi88", "uhd88"):
            brand = "Sagemcom"
            if procmodel == "uhd88":
                model = "UHD 88"
            else:
                model = "ESI 88"
    elif fileExists("/proc/stb/info/boxtype"):
        f = open("/proc/stb/info/boxtype", 'r')
        procmodel = f.readline().strip().lower()
        f.close()
        if procmodel.startswith("et"):
            if procmodel == "et7000mini":
                brand = "Galaxy Innovations"
                model = "ET-7000 Mini"
            elif procmodel == "et11000":
                brand = "Galaxy Innovations"
                model = "ET-11000"
            else:
                brand = "Xtrend"
                model = procmodel.upper()
        elif procmodel.startswith("xpeed"):
            brand = "Golden Interstar"
            model = procmodel
        elif procmodel.startswith("xp"):
            brand = "MaxDigital"
            model = procmodel.upper()
        elif procmodel.startswith("ixuss"):
            brand = "Medialink"
            model = procmodel.replace(" ", "")
        elif procmodel == "formuler4turbo":
            brand = "Formuler"
            model = "F4 Turbo"
        elif procmodel.startswith("formuler"):
            brand = "Formuler"
            model = procmodel.replace("formuler", "")
            if model.isdigit():
                model = 'F' + model
        elif procmodel.startswith("mbtwinplus"):
            brand = "Miraclebox"
            model = "Premium Twin+"
        elif procmodel.startswith("alphatriplehd"):
            brand = "SAB"
            model = "Alpha Triple HD"
        elif procmodel in ("7000s", "mbmicro"):
            procmodel = "mbmicro"
            brand = "Miraclebox"
            model = "Premium Micro"
        elif procmodel in ("7005s", "mbmicrov2"):
            procmodel = "mbmicrov2"
            brand = "Miraclebox"
            model = "Premium Micro v2"
        elif procmodel.startswith("ini"):
            if procmodel.endswith("9000ru"):
                brand = "Sezam"
                model = "Marvel"
            elif procmodel.endswith("5000ru"):
                brand = "Sezam"
                model = "hdx"
            elif procmodel.endswith("1000ru"):
                brand = "Sezam"
                model = "hde"
            elif procmodel.endswith("5000sv"):
                brand = "Miraclebox"
                model = "mbtwin"
            elif procmodel.endswith("1000sv"):
                brand = "Miraclebox"
                model = "mbmini"
            elif procmodel.endswith("1000de"):
                brand = "Golden Interstar"
                model = "Xpeed LX"
            elif procmodel.endswith("9000de"):
                brand = "Golden Interstar"
                model = "Xpeed LX3"
            elif procmodel.endswith("1000lx"):
                brand = "Golden Interstar"
                model = "Xpeed LX"
            elif procmodel.endswith("de"):
                brand = "Golden Interstar"
            elif procmodel.endswith("1000am"):
                brand = "Atemio"
                model = "5x00"
            else:
                brand = "Venton"
                model = "HDx"
        elif procmodel.startswith("unibox-"):
            brand = "Venton"
            model = "HDe"
        elif procmodel == "hd1100":
            brand = "Mut@nt"
            model = "HD1100"
        elif procmodel == "hd1200":
            brand = "Mut@nt"
            model = "HD1200"
        elif procmodel == "hd1265":
            brand = "Mut@nt"
            model = "HD1265"
        elif procmodel == "hd2400":
            brand = "Mut@nt"
            model = "HD2400"
        elif procmodel == "hd51":
            brand = "Mut@nt"
            model = "HD51"
            grabpip = 1
        elif procmodel == "hd11":
            brand = "Mut@nt"
            model = "HD11"
        elif procmodel == "hd500c":
            brand = "Mut@nt"
            model = "HD500c"
        elif procmodel == "hd530c":
            brand = "Mut@nt"
            model = "HD530c"
        elif procmodel == "hd60":
            brand = "Mut@nt"
            model = "HD60"
        elif procmodel == "multibox":
            brand = "MaXytec"
            model = "Multibox"
            grabpip = 1
        elif procmodel == "arivalink200":
            brand = "Ferguson"
            model = "Ariva @Link 200"
        elif procmodel.startswith("spark"):
            brand = "Fulan"
            if procmodel == "spark7162":
                model = "Spark 7162"
            else:
                model = "Spark"
        elif procmodel == "spycat":
            brand = "Spycat"
            model = "Spycat"
        elif procmodel == "spycatmini":
            brand = "Spycat"
            model = "Spycat Mini"
        elif procmodel == "spycatminiplus":
            brand = "Spycat"
            model = "Spycat Mini+"
        elif procmodel == "spycat4kmini":
            brand = "Spycat"
            model = "spycat 4K Mini"
        elif procmodel == "vipercombo":
            brand = "Amiko"
            model = "ViperCombo"
        elif procmodel == "vipert2c":
            brand = "Amiko"
            model = "ViperT2C"
        elif procmodel == "vipercombohdd":
            brand = "Amiko"
            model = "ViperComboHDD"
        elif procmodel == "viperslim":
            brand = "Amiko"
            model = "Viper Slim"
        elif procmodel == "wetekplay":
            brand = "WeTeK"
            model = "Play"
        elif procmodel.startswith("os"):
            brand = "Edision"
            if procmodel == "osmini":
                model = "OS Mini"
            elif procmodel == "osminiplus":
                model = "OS Mini+"
            elif procmodel == "osmega":
                model = "OS Mega"
            elif procmodel == "osnino":
                model = "OS Nino"
            elif procmodel == "osninoplus":
                model = "OS Nino+"
            elif procmodel == "osninopro":
                model = "OS Nino Pro"
            elif procmodel == "osmio4k":
                model = "OS Mio 4K"
                grabpip = 1
            elif procmodel == "osmio4kplus":
                model = "OS Mio 4K+"
                grabpip = 1
            elif procmodel == "osmini4k":
                model = "OS Mini 4K"
                grabpip = 1
            else:
                model = procmodel
        elif procmodel == "h3":
            brand = "Zgemma"
            model = "H3 series"
        elif procmodel == "h4":
            brand = "Zgemma"
            model = "H4 series"
        elif procmodel == "h5":
            brand = "Zgemma"
            model = "H5 series"
        elif procmodel == "h6":
            brand = "Zgemma"
            model = "H6 series"
        elif procmodel == "h7":
            brand = "Zgemma"
            model = "H7 series"
            grabpip = 1
        elif procmodel == "h9 combo":
            procmodel = "h9combo"
            brand = "Zgemma"
            model = "H9 Combo"
        elif procmodel == "h9 twin":
            procmodel = "h9twin"
            brand = "Zgemma"
            model = "H9 Twin"
        elif procmodel.startswith("h9"):
            procmodel = "h9"
            brand = "Zgemma"
            model = "H9 series"
            grabpip = 1
        elif procmodel == "lc":
            brand = "Zgemma"
            model = "LC"
        elif procmodel == "sh1":
            brand = "Zgemma"
            model = "Star series"
        elif procmodel == "i55":
            brand = "Zgemma"
            model = "i55"
        elif procmodel == "i55plus":
            brand = "Zgemma"
            model = "i55Plus"
        elif procmodel == "vs1500":
            brand = "Vimastec"
            model = "vs1500"
            grabpip = 1
        elif procmodel == "sf8008m":
            brand = "Octagon"
            model = "SF8008 4K Mini"
        elif procmodel.startswith("sf"):
            brand = "Octagon"
            if procmodel.startswith("sf8008"):
                sf8008type = open("/proc/stb/info/type").read()
                if sf8008type.startswith("11"):
                    procmodel = "sf8008t"
                    model = "SF8008 4K Twin"
                elif sf8008type.startswith("12"):
                    procmodel = "sf8008c"
                    model = "SF8008 4K Combo"
                else:  # sf8008type.startswith("10")
                    procmodel = "sf8008s"
                    model = "SF8008 4K Single"
            else:
                model = procmodel.upper()
        elif procmodel == "e4hd":
            brand = "Axas"
            model = "E4HD"
            lcd = 1
            grabpip = 1
        elif procmodel == "ustym4kpro":
            brand = "uClan"
            model = "Ustym 4K Pro"
    elif fileExists("/proc/stb/info/model"):
        f = open("/proc/stb/info/model", 'r')
        procmodel = f.readline().strip().lower()
        f.close()
        if procmodel == "tf7700hdpvr":
            brand = "Topfield"
            model = "TF7700 HDPVR"
        elif procmodel == "dsi87":
            brand = "Sagemcom"
            model = "DSI 87"
        elif procmodel.startswith("spark"):
            brand = "Fulan"
            if procmodel == "spark7162":
                model = "Spark 7162"
            else:
                model = "Spark"
        elif (procmodel.startswith("dm") and not procmodel == "dm8000"):
            brand = "Dream Multimedia"
            if procmodel == "dm800":
                model = "DM800 HD PVR"
            elif procmodel == "dm800se":
                model = "DM800 HD se"
            elif procmodel == "dm500hd":
                model = "DM500 HD"
            elif procmodel == "dm7020hd":
                model = "DM7020 HD"
            elif procmodel == "dm820":
                model = "DM820 HD"
            elif procmodel == "dm7080":
                model = "DM7080 HD"
            elif procmodel == "dm520":
                model = "DM520 HD"
            elif procmodel == "dm525":
                model = "DM525 HD"
            elif procmodel == "dm900":
                model = "DM900 HD"
                grabpip = 1
            elif procmodel == "dm920":
                model = "DM920 HD"
                grabpip = 1
            else:
                model = procmodel.replace("dm", "DM", 1)
        # A "dm8000" is only a Dreambox if it passes the tpm verification:
        elif procmodel == "dm8000" and orgdream:
            brand = "Dream Multimedia"
            model = "DM8000"
        else:
            model = procmodel

    if fileExists("/etc/.box"):
        distro = "HDMU"
        f = open("/etc/.box", 'r')
        tempmodel = f.readline().strip().lower()
        if tempmodel.startswith("ufs") or model.startswith("ufc"):
            brand = "Kathrein"
            model = tempmodel.upcase()
            procmodel = tempmodel
        elif tempmodel.startswith("spark"):
            brand = "Fulan"
            model = tempmodel.title()
            procmodel = tempmodel
        elif tempmodel.startswith("xcombo"):
            brand = "EVO"
            model = "enfinityX combo plus"
            procmodel = "vg2000"

    type = procmodel
    if type in ("et9x00", "et9000", "et9100", "et9200", "et9500"):
        type = "et9x00"
    elif type in ("et6x00", "et6000"):
        type = "et6x00"
    elif type in ("et5x00", "et5000"):
        type = "et5x00"
    elif type in ("et4x00", "et4000"):
        type = "et4x00"
    elif type == "xp1000":
        type = "xp1000"
    elif type in ("bska", "bxzb"):
        type = "nbox_white"
    elif type in ("bsla", "bzzb"):
        type = "nbox"
    elif type == "sagemcom88":
        type = "esi88"
    elif type in ("tf7700hdpvr", "topf"):
        type = "topf"

    info['brand'] = brand
    info['model'] = model
    info['procmodel'] = procmodel
    info['type'] = type

    remote = "dmm1"
    if procmodel in ("vusolo", "vuduo", "vuuno", "vusolo2", "vusolose",
                     "vuzero", "vusolo4k", "vuuno4k", "vuultimo4k"):
        remote = "vu_normal"
    elif procmodel == "vuduo2":
        remote = "vu_duo2"
    elif procmodel == "vuultimo":
        remote = "vu_ultimo"
    elif procmodel in ("vuuno4kse", "vuzero4k", "vuduo4k"):
        remote = "vu_normal_02"
    elif procmodel == "e3hd":
        remote = "e3hd"
    elif procmodel in ("et9x00", "et9000", "et9100", "et9200", "et9500"):
        remote = "et9x00"
    elif procmodel in ("et5x00", "et5000", "et6x00", "et6000"):
        remote = "et5x00"
    elif procmodel in ("et4x00", "et4000"):
        remote = "et4x00"
    elif procmodel == "et6500":
        remote = "et6500"
    elif procmodel in ("et8x00", "et8000", "et8500", "et8500s", "et10000"):
        remote = "et8000"
    elif procmodel in ("et7x00", "et7000", "et7500"):
        remote = "et7x00"
    elif procmodel in ("et7000mini", "et11000"):
        remote = "et7000mini"
    elif procmodel == "gbquad":
        remote = "gigablue"
    elif procmodel == "gbquadplus":
        remote = "gbquadplus"
    elif procmodel in ("gbquad4k", "gbue4k", "quad4k", "ue4k", "gbtrio4k"):
        remote = "gb7252"
    elif procmodel in ("formuler1", "formuler3", "formuler4",
                       "formuler4turbo"):
        remote = "formuler1"
    elif procmodel in ("azboxme", "azboxminime", "me", "minime"):
        remote = "me"
    elif procmodel in ("optimussos1", "optimussos1plus", "optimussos2",
                       "optimussos2plus"):
        remote = "optimuss"
    elif procmodel in ("premium", "premium+"):
        remote = "premium"
    elif procmodel in ("elite", "ultra"):
        remote = "elite"
    elif procmodel in ("ini-1000", "ini-1000ru"):
        remote = "ini-1000"
    elif procmodel in ("ini-1000sv", "ini-5000sv", "ini-9000de"):
        remote = "miraclebox"
    elif procmodel in ("mbtwinplus", "mbmicro", "mbmicrov2"):
        remote = "miraclebox2"
    elif procmodel == "alphatriplehd":
        remote = "alphatriplehd"
    elif procmodel == "ini-3000":
        remote = "ini-3000"
    elif procmodel in ("ini-7012", "ini-7000", "ini-5000", "ini-5000ru"):
        remote = "ini-7000"
    elif procmodel.startswith("spark"):
        remote = "spark"
    elif procmodel == "xp1000":
        remote = "xp1000"
    elif procmodel.startswith("xpeedlx"):
        remote = "xpeedlx"
    elif procmodel in ("adb2850", "adb2849", "bska", "bsla", "bxzb", "bzzb",
                       "esi88", "uhd88", "dsi87", "arivalink200"):
        remote = "nbox"
    elif procmodel in ("hd1100", "hd1200", "hd1265", "hd1400", "hd51", "hd11",
                       "hd500c", "hd530c"):
        remote = "hd1x00"
    elif procmodel == "hd2400":
        remote = "hd2400"
    elif procmodel == "hd60":
        remote = "hd60"
    elif procmodel == "multibox":
        remote = "multibox"
    elif procmodel in ("spycat", "spycatmini", "spycatminiplus",
                       "spycat4kmini"):
        remote = "spycat"
    elif procmodel.startswith("ixuss"):
        remote = procmodel.replace(" ", "")
    elif procmodel == "vg2000":
        remote = "xcombo"
    elif procmodel == "dm8000" and orgdream:
        remote = "dmm1"
    elif procmodel in ("dm7080", "dm7020hd", "dm7020hdv2", "dm800sev2",
                       "dm500hdv2", "dm520", "dm820", "dm900", "dm920"):
        remote = "dmm2"
    elif procmodel == "wetekplay":
        remote = procmodel
    elif procmodel.startswith("osm") and "4k" in procmodel:
        remote = "edision4"
    elif procmodel.startswith("osm"):
        remote = "osmini"
    elif procmodel.startswith("osninopr"):
        remote = "edision3"
    elif procmodel.startswith("osninopl"):
        remote = "edision2"
    elif procmodel.startswith("osn"):
        remote = "edision1"
    elif procmodel in ("fusionhd"):
        remote = procmodel
    elif procmodel in ("fusionhdse"):
        remote = procmodel
    elif procmodel in ("purehd", "purehdse"):
        remote = "purehd"
    elif procmodel in ("revo4k"):
        remote = procmodel
    elif procmodel in ("galaxy4k"):
        remote = procmodel
    elif procmodel in ("lunix3-4k", "lunix"):
        remote = "qviart"
    elif procmodel in ("lunix4k"):
        remote = "lunix4k"
    elif procmodel in ("sh1", "lc"):
        remote = "sh1"
    elif procmodel in ("h3", "h4", "h5", "h6", "h7", "h9", "i55plus",
                       "h9combo", "h9twin"):
        remote = "h3"
    elif procmodel == "i55":
        remote = "i55"
    elif procmodel in ("vipercombo", "vipert2c"):
        remote = "amiko"
    elif procmodel in ("vipercombohdd"):
        remote = "amiko1"
    elif procmodel == "viperslim":
        remote = "viperslim"
    elif procmodel.startswith("sf"):
        remote = "octagon"
    elif procmodel in ("vs1100", "vs1500"):
        remote = "vs1x00"
    elif procmodel in ("e4hd"):
        remote = "e4hd"
    elif procmodel in ("ustym4kpro"):
        remote = "uclan"

    info['remote'] = remote

    try:
        kernel = int(about.getKernelVersionString()[0])
    except NameError:  # when "about" is not available
        try:
            kernel = int(
                open("/proc/version", "r").read().split(' ',
                                                        4)[2].split('.', 2)[0])
        except:  # nosec  # noqa: E722  # set a default
            kernel = 2

    distro = "unknown"
    imagever = "unknown"
    imagebuild = ""
    driverdate = "unknown"

    # Assume OE 1.6
    oever = "OE 1.6"
    if kernel > 2:
        oever = "OE 2.0"

    if fileExists("/etc/.box"):
        distro = "HDMU"
        oever = "private"
    elif fileExists("/etc/bhversion"):
        distro = "Black Hole"
        f = open("/etc/bhversion", 'r')
        imagever = f.readline().strip()
        f.close()
        if kernel > 2:
            oever = "OpenVuplus 2.1"
    elif fileExists("/etc/vtiversion.info"):
        distro = "VTi-Team Image"
        f = open("/etc/vtiversion.info", 'r')
        imagever = f.readline().strip().replace("VTi-Team Image ", "").replace(
            "Release ", "").replace("v.", "")
        f.close()
        oever = "OE 1.6"
        imagelist = imagever.split('.')
        imagebuild = imagelist.pop()
        imagever = ".".join(imagelist)
        if kernel > 2:
            oever = "OpenVuplus 2.1"
        if ((imagever == "5.1") or (imagever[0] > 5)):
            oever = "OpenVuplus 2.1"
    elif fileExists("/var/grun/grcstype"):
        distro = "Graterlia OS"
        try:
            imagever = about.getImageVersionString()
        except:  # nosec  # noqa: E722
            pass
    # ToDo: If your distro gets detected as OpenPLi, feel free to add a detection for your distro here ...
    else:
        # OE 2.2 uses apt, not opkg
        if not fileExists("/etc/opkg/all-feed.conf"):
            oever = "OE 2.2"
        else:
            try:
                f = open("/etc/opkg/all-feed.conf", 'r')
                oeline = f.readline().strip().lower()
                f.close()
                distro = oeline.split()[1].replace("-all", "")
            except:  # nosec  # noqa: E722
                pass

        if distro in ("openpli", "satdreamgr", "openvision", "openrsi"):
            oever = "PLi-OE"
            try:
                imagelist = open(
                    "/etc/issue").readlines()[-2].split()[1].split('.')
                imagever = imagelist.pop(0)
                if imagelist:
                    imagebuild = "".join(imagelist)
                else:
                    # deal with major release versions only
                    if imagever.isnumeric():
                        imagebuild = "0"
            except:  # nosec  # noqa: E722
                # just in case
                pass
        else:
            try:
                imagever = about.getImageVersionString()
            except:  # nosec  # noqa: E722
                pass

        if (distro == "unknown" and brand == "Vu+"
                and fileExists("/etc/version")):
            # Since OE-A uses boxbranding and bh or vti can be detected, there isn't much else left for Vu+ boxes
            distro = "Vu+ original"
            f = open("/etc/version", 'r')
            imagever = f.readline().strip()
            f.close()
            if kernel > 2:
                oever = "OpenVuplus 2.1"

    # reporting the installed dvb-module version is as close as we get without too much hassle
    driverdate = 'unknown'
    try:
        driverdate = os.popen('/usr/bin/opkg -V0 list_installed *dvb-modules*'
                              ).readline().split()[2]  # nosec
    except:  # noqa: E722
        try:
            driverdate = os.popen(
                '/usr/bin/opkg -V0 list_installed *dvb-proxy*').readline(
                ).split()[2]  # nosec
        except:  # noqa: E722
            try:
                driverdate = os.popen(
                    '/usr/bin/opkg -V0 list_installed *kernel-core-default-gos*'
                ).readline().split()[2]  # nosec
            except:  # nosec # noqa: E722
                pass
    re_search = re.search('([0-9]{8})', driverdate)
    if re_search is not None:
        driverdate = re_search.group(1)

    info['oever'] = oever
    info['distro'] = distro
    info['imagever'] = imagever
    info['imagebuild'] = imagebuild
    info['driverdate'] = driverdate
    info['lcd'] = distro in ("openpli", "satdreamgr", "openvision",
                             "openrsi") and lcd or 0
    info['grabpip'] = distro in ("openpli", "satdreamgr", "openvision",
                                 "openrsi") and grabpip or 0
    return info