コード例 #1
0
ファイル: About.py プロジェクト: fcjohn/enigma2
    def __init__(self, session, parent):
        Screen.__init__(self, session, parent=parent)
        self["selected"] = StaticText("openATV:" + getImageVersionString())

        AboutText = _("Model:\t%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") % getImageVersionString() + "\n"
        AboutText += _("Build: %s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        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)
コード例 #2
0
ファイル: About.py プロジェクト: regin92/enigma2
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		self["selected"] = StaticText("openATV:" + getImageVersionString())

		AboutText = _("Model:\t%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") % getImageVersionString() + "\n"
		AboutText += _("Build: %s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		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)
コード例 #3
0
ファイル: downloader.py プロジェクト: skywatcher111/enigma2
    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, _("Select an image to be downloaded"),
                              _("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" % (getImageVersionString())
        self.branch = START
        self.updateButtons()
コード例 #4
0
    def getlog(self):
        global ocram
        try:
            sourcefile = 'http://enigma2.world-of-satellite.com/feeds/' + getImageVersionString(
            ) + '/' + getBoxType() + '/' + 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(' ')
                if len(releasever) > 2:
                    releasever = releasever[2].replace(':', "")
                else:
                    releasever = releasever[0].replace(':', "")

            while int(releasever) > int(getBuildVersionString()):
                if ocram:
                    viewrelease += releasenotes[int(ver)] + '\n' + ocram + '\n'
                    ocram = ""
                else:
                    viewrelease += releasenotes[int(ver)] + '\n\n'
                ver += 1
                releasever = releasenotes[int(ver)].split('\n')
                releasever = releasever[0].split(' ')
                releasever = releasever[2].replace(':', "")
            if not viewrelease and ocram:
                viewrelease = ocram
                ocram = ""
            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(viewrelease)
        else:
            self['title_summary'].setText("")
            self['text_summary'].setText(_("Error downloading change log."))
            self['text'].setText(_("Error downloading change log."))
コード例 #5
0
ファイル: SoftwareUpdate.py プロジェクト: pappaalfio/enigma2
	def getlog(self):
		global ocram
		try:
			sourcefile = 'http://enigma2.world-of-satellite.com/feeds/' + getImageVersionString() + '/' + getBoxType() + '/'  + 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 '404 Not Found' not in releasenotes:
			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(' ')
				if len(releasever) > 2:
					releasever = releasever[2].replace(':',"")
				else:
					releasever = releasever[0].replace(':',"")

			while int(releasever) > int(getBuildVersionString()):
				if ocram:
					viewrelease += releasenotes[int(ver)]+'\n'+ocram+'\n'
					ocram = ""
				else:
					viewrelease += releasenotes[int(ver)]+'\n\n'
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split(' ')
				releasever = releasever[2].replace(':',"")
			if not viewrelease and ocram:
				viewrelease = ocram
				ocram = ""
			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(viewrelease)
		else:
			self['title_summary'].setText("")
			self['text_summary'].setText(_("Error downloading change log."))
			self['text'].setText(_("Error downloading change log."))
コード例 #6
0
ファイル: About.py プロジェクト: fcjohn/enigma2
    def populate(self):
        self["lab1"] = StaticText(_("openATV"))
        self["lab2"] = StaticText(_("By openATV Image Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower(
            ).replace('\n', '').replace('bcm', '') + "\n"

        AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
        AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

        AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
        AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s") % driversdate + "\n"

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            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"

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
コード例 #7
0
ファイル: About.py プロジェクト: regin92/enigma2
	def populate(self):
		self["lab1"] = StaticText(_("openATV"))
		self["lab2"] = StaticText(_("By openATV Image Team"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n"


		AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
		AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			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"

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
コード例 #8
0
ファイル: SoftwareTools.py プロジェクト: HasBahCa/enigma2
	def __init__(self):
		aboutInfo = 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.hardware_info = HardwareInfo()
		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)
コード例 #9
0
ファイル: downloader.py プロジェクト: Tron3/enigma2
	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, _("Select an image to be downloaded"), _("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" % (getImageVersionString())
		self.branch = START
		self.updateButtons()
コード例 #10
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") %
            (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)
コード例 #11
0
 def __init__(self):
     aboutInfo = 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.hardware_info = HardwareInfo()
     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)
コード例 #12
0
ファイル: plugin.py プロジェクト: jall19/oe-alliance-plugins
from Components.Sources.StaticText import StaticText
from Components.ActionMap import NumberActionMap, ActionMap
from Components.NimManager import nimmanager, getConfigSatlist
from Components.config import config, ConfigSubsection, ConfigSelection, ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable
from Components.Sources.Boolean import Boolean
from Components.Sources.StaticText import StaticText
from Components.Pixmap import Pixmap

from Tools.HardwareInfo import HardwareInfo
from Tools.Directories import resolveFilename

from enigma import eTimer, eDVBFrontendParametersSatellite, eComponentScan, eDVBSatelliteEquipmentControl, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersCable, eConsoleAppContainer, eDVBResourceManager, getBoxType

try:
	from enigma import getImageVersionString, getBuildVersionString
	versionstring = getImageVersionString()
	buildstring = getBuildVersionString()
except:
	from Components.About import about
	versionstring = about.getImageVersionString()
	buildstring = about.getBuildVersionString()

def getDistro():
	try:
		from enigma import getDistro as e2_getDistro
		return e2_getDistro()
	except:
		try:
			file = open('/etc/image-version', 'r')
			lines = file.readlines()
			file.close()
コード例 #13
0
def getEnigmaVersionString():
    return getImageVersionString()
コード例 #14
0
def getVersionString():
    return getImageVersionString()
コード例 #15
0
ファイル: About.py プロジェクト: Ophiuchus1312/enigma2-master
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		self["selected"] = StaticText("openATV:" + getImageVersionString())

		AboutText = ""
		model = None

		if getBoxType() == 'vuuno':
			model = "Vu+ Uno"
		elif getBoxType() == 'vuultimo':
			model = "Vu+ Ultimo"
		elif getBoxType() == 'vusolo':
			model = "Vu+ Solo"
		elif getBoxType() == 'vusolo2':
			model = "Vu+ Solo" + chr(178)
		elif getBoxType() == 'vuduo':
			model = "Vu+ Duo"
		elif getBoxType() == 'vuduo2':
			model = "Vu+ Duo" + chr(178)
		elif getBoxType() == 'et4x00':
			model = "Xtrend ET4x00 Series"
		elif getBoxType() == 'et5x00':
			model = "Xtrend ET5x00 Series"
		elif getBoxType() == 'et6x00':
			model = "Xtrend ET6x00 Series"
		elif getBoxType() == 'et9x00':
			model = "Xtrend ET9x00 Series"
		elif getBoxType() == 'odinm7':
			model = "Odin M7"
		elif getBoxType() == 'odinm9':
			model = "Odin M9"
		elif getBoxType() == 'gb800solo':
			model = "GigaBlue HD 800 Solo"
		elif getBoxType() == 'gb800se':
			model = "GigaBlue HD 800 SE"
		elif getBoxType() == 'gb800ue':
			model = "GigaBlue HD 800 UE"
		elif getBoxType() == 'gbquad':
			model = "GigaBlue HD Quad"
		elif getBoxType() == 'ventonhdx':
			model = "Venton Unibox HDx"
		elif getBoxType() == 'ventonhde':
			model = "Venton Unibox HDe"
		elif getBoxType() == 'ixussone':
			model = "Ixuss One"
		elif getBoxType() == 'ixusszero':
			model = "Ixuss Zero"
		elif getBoxType() == 'ixussduo':
			model = "Ixuss Duo"
		elif getBoxType() == 'tmtwin':
			model = "Technomate Twin"
		elif getBoxType() == 'tm2t':
			model = "Technomate 2T"
		elif getBoxType() == 'tmsingle':
			model = "Technomate Single"
		elif getBoxType() == 'tmnano':
			model = "Technomate Nano OE"
		elif getBoxType() == 'iqonios100hd':
			model = "iqon IOS 100HD"
		elif getBoxType() == 'iqonios200hd':
			model = "iqon IOS 200HD"
		elif getBoxType() == 'iqonios300hd':
			model = "iqon IOS 300HD"			
		elif getBoxType() == 'xp1000':
			model = "XP1000"
		elif getBoxType() == 'ebox5000':
			model = "MixOS F5"
		elif getBoxType() == 'ebox5100':
			model = "MixOS F5mini"
		elif getBoxType() == 'dm500hd':
			model = "DREAMBOX DM500HD"
		elif getBoxType() == 'dm800':
			model = "DREAMBOX DM800HD"
		elif getBoxType() == 'dm800se':
			model = "DREAMBOX DM800se"
		elif getBoxType() == 'dm7020hd':
			model = "DREAMBOX DM7020HD"
		elif getBoxType() == 'dm8000':
			model = "DREAMBOX DM8000HD"
		else:
			model = getBoxType()

		if model:
			AboutText += _("Model: %s") % model + "\n"

		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") % getImageVersionString() + "\n"
		AboutText += _("Build: %s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		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)
コード例 #16
0
from mediabackends.E2MediaBackend import E2MediaBackend
from protocol_handler import AirplayProtocolHandler
from AirTunes import AirtunesProtocolHandler
from Components.config import config
from Components.config import ConfigSelection
from Components.config import getConfigListEntry
from Components.config import ConfigInteger
from Components.config import ConfigText
from Components.config import ConfigYesNo
from Components.Network import iNetwork
from Screens.MessageBox import MessageBox
from Components.Label import Label
from enigma import getImageVersionString
from Tools import Notifications

currentVersion = getImageVersionString()

config.plugins.airplayer.startuptype = ConfigYesNo(default=True)
config.plugins.airplayer.name = ConfigText(default='Open Vision',
                                           fixed_size=False)
config.plugins.airplayer.path = ConfigText(default='/media/hdd/',
                                           fixed_size=False)
config.plugins.airplayer.audioBackend = ConfigSelection(default='alsa',
                                                        choices={
                                                            'proxy':
                                                            _('proxy'),
                                                            'alsa': _('ALSA')
                                                        })
config.plugins.airplayer.setSeekOnStart = ConfigYesNo(default=True)
config.plugins.airplayer.version = ConfigText(default=currentVersion)
config.plugins.airplayer.stopTVOnPicture = ConfigYesNo(default=True)
コード例 #17
0
    def ipkgCallback(self, event, param):
        if event == IpkgComponent.EVENT_DOWNLOAD:
            self.status.setText(_("Downloading"))
        elif event == IpkgComponent.EVENT_UPGRADE:
            if self.sliderPackages.has_key(param):
                self.slider.setValue(self.sliderPackages[param])
            self.package.setText(param)
            self.status.setText(
                _("Upgrading") + ": %s/%s" %
                (self.packages, self.total_packages))
            if not param in self.processed_packages:
                self.processed_packages.append(param)
                self.packages += 1
        elif event == IpkgComponent.EVENT_INSTALL:
            self.package.setText(param)
            self.status.setText(_("Installing"))
            if not param in self.processed_packages:
                self.processed_packages.append(param)
                self.packages += 1
        elif event == IpkgComponent.EVENT_REMOVE:
            self.package.setText(param)
            self.status.setText(_("Removing"))
            if not param in self.processed_packages:
                self.processed_packages.append(param)
                self.packages += 1
        elif event == IpkgComponent.EVENT_CONFIGURING:
            self.package.setText(param)
            self.status.setText(_("Configuring"))

        elif event == IpkgComponent.EVENT_MODIFIED:
            if config.plugins.softwaremanager.overwriteConfigFiles.getValue(
            ) in ("N", "Y"):
                self.ipkg.write(True and config.plugins.softwaremanager.
                                overwriteConfigFiles.getValue())
            else:
                self.session.openWithCallback(
                    self.modificationCallback, MessageBox,
                    _("A configuration file (%s) has been modified since it was installed.\nDo you want to keep your modifications?"
                      ) % (param))
        elif event == IpkgComponent.EVENT_ERROR:
            self.error += 1
        elif 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:
                from urllib import urlopen
                import socket
                currentTimeoutDefault = socket.getdefaulttimeout()
                socket.setdefaulttimeout(3)
                try:
                    config.softwareupdate.updateisunstable.setValue(
                        urlopen(
                            "http://enigma2.world-of-satellite.com/feeds/" +
                            getImageVersionString() + "/status").read())
                except:
                    config.softwareupdate.updateisunstable.setValue(1)
                socket.setdefaulttimeout(currentTimeoutDefault)
                self.total_packages = None
                if config.softwareupdate.updateisunstable.getValue(
                ) == '1' and config.softwareupdate.updatebeta.getValue():
                    self.total_packages = len(self.ipkg.getFetchedList())
                    message = _("The current update maybe unstable") + "\n" + _(
                        "Are you sure you want to update your %s %s ?") % (
                            getMachineBrand(), getMachineName()) + "\n(" + (
                                ngettext("%s updated package available",
                                         "%s updated packages available",
                                         self.total_packages) %
                                self.total_packages) + ")"
                elif config.softwareupdate.updateisunstable.getValue() == '0':
                    self.total_packages = len(self.ipkg.getFetchedList())
                    message = _("Do you want to update your %s %s ?") % (
                        getMachineBrand(), getMachineName()) + "\n(" + (
                            ngettext("%s updated package available",
                                     "%s updated packages available",
                                     self.total_packages) %
                            self.total_packages) + ")"
                if self.total_packages:
                    global ocram
                    for package_tmp in self.ipkg.getFetchedList():
                        if package_tmp[0].startswith(
                                'enigma2-plugin-picons-tv-ocram'):
                            ocram = ocram + '[ocram-picons] ' + package_tmp[
                                0].split('enigma2-plugin-picons-tv-ocram.')[
                                    1] + 'updated ' + package_tmp[2] + '\n'
                        elif package_tmp[0].startswith(
                                'enigma2-plugin-settings-ocram'):
                            ocram = ocram + '[ocram-settings] ' + package_tmp[
                                0].split('enigma2-plugin-picons-tv-ocram.')[
                                    1] + 'updated ' + package_tmp[2] + '\n'
                    config.softwareupdate.updatefound.setValue(True)
                    choices = [(_("View the changes"), "changes"),
                               (_("Upgrade and reboot system"), "cold")]
                    if path.exists(
                            "/usr/lib/enigma2/python/Plugins/SystemPlugins/ViX/BackupManager.pyo"
                    ):
                        if not config.softwareupdate.autosettingsbackup.getValue(
                        ) and config.backupmanager.backuplocation.getValue():
                            choices.append(
                                (_("Perform a setting backup,") + '\n\t' +
                                 _("making a backup before updating") +
                                 '\n\t' + _("is strongly advised."), "backup"))
                        if not config.softwareupdate.autoimagebackup.getValue(
                        ) and config.imagemanager.backuplocation.getValue():
                            choices.append((_("Perform a full image backup"),
                                            "imagebackup"))
                    choices.append((_("Update channel list only"), "channels"))
                    choices.append((_("Cancel"), ""))
                    upgrademessage = self.session.openWithCallback(
                        self.startActualUpgrade,
                        ChoiceBox,
                        title=message,
                        list=choices,
                        skin_name="SoftwareUpdateChoices")
                    upgrademessage.setTitle(_('Software update'))
                else:
                    upgrademessage = self.session.openWithCallback(
                        self.close,
                        MessageBox,
                        _("Nothing to upgrade"),
                        type=MessageBox.TYPE_INFO,
                        timeout=10,
                        close_on_any_key=True)
                    upgrademessage.setTitle(_('Software update'))
            elif self.channellist_only > 0:
                if self.channellist_only == 1:
                    self.setEndMessage(
                        _("Could not find installed channel list."))
                elif self.channellist_only == 2:
                    self.slider.setValue(2)
                    self.ipkg.startCmd(IpkgComponent.CMD_REMOVE,
                                       {'package': self.channellist_name})
                    self.channellist_only += 1
                elif self.channellist_only == 3:
                    self.slider.setValue(3)
                    self.ipkg.startCmd(IpkgComponent.CMD_INSTALL,
                                       {'package': self.channellist_name})
                    self.channellist_only += 1
                elif self.channellist_only == 4:
                    self.showUpdateCompletedMessage()
                    eDVBDB.getInstance().reloadBouquets()
                    eDVBDB.getInstance().reloadServicelist()
            elif self.error == 0:
                self.showUpdateCompletedMessage()
            else:
                self.activityTimer.stop()
                self.activityslider.setValue(0)
                error = _(
                    "Your %s %s might be unusable now. Please consult the manual for further assistance before rebooting your %s %s."
                ) % (getMachineBrand(), getMachineName(), getMachineBrand(),
                     getMachineName())
                if self.packages == 0:
                    error = _("No updates available. Please try again later.")
                if self.updating:
                    error = _(
                        "Update failed. Your %s %s does not have a working internet connection."
                    ) % (getMachineBrand(), getMachineName())
                self.status.setText(_("Error") + " - " + error)
        elif event == IpkgComponent.EVENT_LISTITEM:
            if 'enigma2-plugin-settings-' in param[
                    0] and self.channellist_only > 0:
                self.channellist_name = param[0]
                self.channellist_only = 2
        #print event, "-", param
        pass
コード例 #18
0
ファイル: SoftwareUpdate.py プロジェクト: pappaalfio/enigma2
	def ipkgCallback(self, event, param):
		if event == IpkgComponent.EVENT_DOWNLOAD:
			self.status.setText(_("Downloading"))
		elif event == IpkgComponent.EVENT_UPGRADE:
			if self.sliderPackages.has_key(param):
				self.slider.setValue(self.sliderPackages[param])
			self.package.setText(param)
			self.status.setText(_("Upgrading") + ": %s/%s" % (self.packages, self.total_packages))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_INSTALL:
			self.package.setText(param)
			self.status.setText(_("Installing"))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_REMOVE:
			self.package.setText(param)
			self.status.setText(_("Removing"))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_CONFIGURING:
			self.package.setText(param)
			self.status.setText(_("Configuring"))

		elif event == IpkgComponent.EVENT_MODIFIED:
			if config.plugins.softwaremanager.overwriteConfigFiles.getValue() in ("N", "Y"):
				self.ipkg.write(True and config.plugins.softwaremanager.overwriteConfigFiles.getValue())
			else:
				self.session.openWithCallback(
					self.modificationCallback,
					MessageBox,
					_("A configuration file (%s) has been modified since it was installed.\nDo you want to keep your modifications?") % (param)
				)
		elif event == IpkgComponent.EVENT_ERROR:
			self.error += 1
		elif 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:
				from urllib import urlopen
				import socket
				currentTimeoutDefault = socket.getdefaulttimeout()
				socket.setdefaulttimeout(3)
				try:
					config.softwareupdate.updateisunstable.setValue(urlopen("http://enigma2.world-of-satellite.com/feeds/" + getImageVersionString() + "/status").read())
				except:
					config.softwareupdate.updateisunstable.setValue(1)
				socket.setdefaulttimeout(currentTimeoutDefault)
				self.total_packages = None
				if config.softwareupdate.updateisunstable.getValue() == '1' and config.softwareupdate.updatebeta.getValue():
					self.total_packages = len(self.ipkg.getFetchedList())
					message = _("The current update maybe unstable") + "\n" + _("Are you sure you want to update your %s %s ?") % (getMachineBrand(), getMachineName()) + "\n(" + (ngettext("%s updated package available", "%s updated packages available", self.total_packages) % self.total_packages) + ")"
				elif config.softwareupdate.updateisunstable.getValue() == '0':
					self.total_packages = len(self.ipkg.getFetchedList())
					message = _("Do you want to update your %s %s ?") % (getMachineBrand(), getMachineName()) + "\n(" + (ngettext("%s updated package available", "%s updated packages available", self.total_packages) % self.total_packages) + ")"
				if self.total_packages:
					global ocram
					for package_tmp in self.ipkg.getFetchedList():
						if package_tmp[0].startswith('enigma2-plugin-picons-tv-ocram'):
							ocram = ocram + '[ocram-picons] ' + package_tmp[0].split('enigma2-plugin-picons-tv-ocram.')[1] + 'updated ' + package_tmp[2] + '\n'
						elif package_tmp[0].startswith('enigma2-plugin-settings-ocram'):
							ocram = ocram + '[ocram-settings] ' + package_tmp[0].split('enigma2-plugin-picons-tv-ocram.')[1] + 'updated ' + package_tmp[2] + '\n'
					config.softwareupdate.updatefound.setValue(True)
					choices = [(_("View the changes"), "changes"),
						(_("Upgrade and reboot system"), "cold")]
					if path.exists("/usr/lib/enigma2/python/Plugins/SystemPlugins/ViX/BackupManager.pyo"):
						if not config.softwareupdate.autosettingsbackup.getValue() and config.backupmanager.backuplocation.getValue():
							choices.append((_("Perform a setting backup,") + '\n\t' + _("making a backup before updating") + '\n\t' +_("is strongly advised."), "backup"))
						if not config.softwareupdate.autoimagebackup.getValue() and config.imagemanager.backuplocation.getValue():
							choices.append((_("Perform a full image backup"), "imagebackup"))
					choices.append((_("Update channel list only"), "channels"))
					choices.append((_("Cancel"), ""))
					upgrademessage = self.session.openWithCallback(self.startActualUpgrade, ChoiceBox, title=message, list=choices, skin_name = "SoftwareUpdateChoices")
					upgrademessage.setTitle(_('Software update'))
				else:
					upgrademessage = self.session.openWithCallback(self.close, MessageBox, _("Nothing to upgrade"), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
					upgrademessage.setTitle(_('Software update'))
			elif self.channellist_only > 0:
				if self.channellist_only == 1:
					self.setEndMessage(_("Could not find installed channel list."))
				elif self.channellist_only == 2:
					self.slider.setValue(2)
					self.ipkg.startCmd(IpkgComponent.CMD_REMOVE, {'package': self.channellist_name})
					self.channellist_only += 1
				elif self.channellist_only == 3:
					self.slider.setValue(3)
					self.ipkg.startCmd(IpkgComponent.CMD_INSTALL, {'package': self.channellist_name})
					self.channellist_only += 1
				elif self.channellist_only == 4:
					self.showUpdateCompletedMessage()
					eDVBDB.getInstance().reloadBouquets()
					eDVBDB.getInstance().reloadServicelist()
			elif self.error == 0:
				self.showUpdateCompletedMessage()
			else:
				self.activityTimer.stop()
				self.activityslider.setValue(0)
				error = _("Your %s %s might be unusable now. Please consult the manual for further assistance before rebooting your %s %s.") % (getMachineBrand(), getMachineName(), getMachineBrand(), getMachineName())
				if self.packages == 0:
					error = _("No updates available. Please try again later.")
				if self.updating:
					error = _("Update failed. Your %s %s does not have a working internet connection.") % (getMachineBrand(), getMachineName())
				self.status.setText(_("Error") +  " - " + error)
		elif event == IpkgComponent.EVENT_LISTITEM:
			if 'enigma2-plugin-settings-' in param[0] and self.channellist_only > 0:
				self.channellist_name = param[0]
				self.channellist_only = 2
		#print event, "-", param
		pass
コード例 #19
0
ファイル: About.py プロジェクト: Nobody28/enigma2
def getEnigmaVersionString():
	return getImageVersionString()
コード例 #20
0
    def updateStatus(self):
        print "[TVCharts] Status Update ..."
        self.DBStatusTimer.stop()

        if not config.plugins.tvcharts.enabled.value or Screens.Standby.inStandby:
            return

        # Get Channelname
        sref = self.session.nav.getCurrentlyPlayingServiceReference()
        if sref is not None:
            ref = eServiceReference(sref.toString())
            ref.setName("")
            serviceHandler = eServiceCenter.getInstance()
            info = serviceHandler.info(ref)
            channel_name = info and info.getName(ref).replace(
                '\xc2\x86', '').replace('\xc2\x87', '').decode(
                    "utf-8", "ignore").encode("utf-8") or ""
            self.serviceref = ref.toString()
        else:
            channel_name = ""
            self.serviceref = ""

        # Get Event Info
        service = self.session.nav.getCurrentService()
        info = service and service.info()
        event = info and info.getEvent(0)
        event_name = event and event.getEventName() or ""
        event_description = ""
        event_begin = 0

        if event is not None:
            curEvent = parseEvent(event)
            event_begin = int(
                curEvent[0]) + (config.recording.margin_before.getValue() * 60)
            event_description = event.getExtendedDescription()

        # Get Box Info
        self.BoxID = iNetwork.getAdapterAttribute("eth0", "mac")
        self.DeviceName = HardwareInfo().get_device_name()
        try:
            from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
            self.EnigmaVersion = getEnigmaVersionString()
            self.ImageVersion = getImageVersionString(
            ) + '.' + getBuildVersionString()
        except:
            self.EnigmaVersion = about.getEnigmaVersionString()
            self.ImageVersion = about.getVersionString()

        # Get TimerList
        self.timerlist = ""
        if config.plugins.tvcharts.submittimers.value and self.LastTimerlistUpdate <= (
                time() - 1800):
            self.LastTimerlistUpdate = time()
            try:
                for timer in self.recordtimer.timer_list:
                    if timer.disabled == 0 and timer.justplay == 0:
                        self.timerlist += "%s|%s|%s|%s|%s|%s|%s\n" % (
                            timer.eit,
                            str(
                                int(timer.begin) +
                                (config.recording.margin_before.getValue() *
                                 60)),
                            str(
                                int(timer.end) -
                                (config.recording.margin_after.getValue() *
                                 60)), str(timer.service_ref), timer.name,
                            timer.service_ref.getServiceName().replace(
                                '\xc2\x86', '').replace('\xc2\x87', '').decode(
                                    "utf-8",
                                    "ignore").encode("utf-8"), timer.repeated)
            except Exception:
                print "[TVCharts] Error loading timers!"

        # Get Pluginlist
        if config.plugins.tvcharts.submitplugins.value and self.pluginlist == "":
            try:
                os_system(
                    "opkg list_installed | grep enigma2-plugin- > /tmp/plugins.txt"
                )
                for plugin in open('/tmp/plugins.txt', 'r'):
                    self.pluginlist += plugin[0:plugin.find(' - ')] + "\n"
                os_system("rm -f /tmp/plugins.txt")
            except Exception:
                print "[TVCharts] Error loading plugins!"

        # Status Update
        getPage(
            url='http://www.dreambox-plugins.de/feeds/TVCharts/status.php',
            agent="Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)",
            timeout=60,
            method='POST',
            headers={
                'Content-Type': 'application/x-www-form-urlencoded'
            },
            postdata=urlencode({
                'boxid': self.BoxID,
                'devicename': self.DeviceName,
                'imageversion': self.ImageVersion,
                'enigmaversion': self.EnigmaVersion,
                'lastchannel': channel_name,
                'lastevent': event_name,
                'eventdescr': event_description,
                'lastbegin': event_begin,
                'lastserviceref': self.serviceref,
                'timerlist': self.timerlist,
                'pluginlist': self.pluginlist
            })).addErrback(self.updateError)

        # Restart Timer
        self.DBStatusTimer.start(900000, True)
コード例 #21
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/" + 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
コード例 #22
0
ファイル: flasher.py プロジェクト: HasBahCa/enigma2
	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") % (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)
コード例 #23
0
ファイル: e2info.py プロジェクト: LoSoS85/OpenStore
def getInfo():
	# TODO: get webif versione somewhere!
	info = {}

	brand = "Dream Multimedia"
	model = "unknown"
	chipset = "unknown"

	if fileExists("/proc/stb/info/hwmodel"):
		file = open("/proc/stb/info/hwmodel")
		model = file.read().strip().lower()
		file.close()
		if model == "tmtwinoe":
			model = "TM-TWIN-OE"
			brand = "Technomate"
		elif model == "tm2toe":
			model = "TM-2T-OE"
			brand = "Technomate"
		elif model == "tmsingle":
			model = "TM-SINGLE"
			brand = "Technomate"
		elif model == "tmnanooe":
			model = "TM-NANO-OE"
			brand = "Technomate"
		elif model == "ios100hd":
			model = "IOS-100HD"
			brand = "Iqon"
		elif model == "ios200hd":
			model = "IOS-200HD"
			brand = "Iqon"
		elif model == "ios300hd":
			model = "IOS-300HD"
			brand = "Iqon"
		elif model == "optimussos1":
			model = "Optimuss-OS1"
			brand = "Edision"
		elif model == "optimussos2":
			model = "Optimuss-OS2"
			brand = "Edision"
	elif fileExists("/proc/stb/info/boxtype"):
		file = open("/proc/stb/info/boxtype")
		model = file.read().strip().lower()
		file.close()
		if model == "gigablue":
			brand = "GigaBlue"
			if fileExists("/proc/stb/info/gbmodel"):
				file = open("/proc/stb/info/gbmodel")
				model = file.read().strip().lower()
				file.close()
				if model == "quad":
					model = "gbquad"
			else:
				model = 'gb800solo'
		elif model.startswith("et"):
			brand = "Clarke-Xtrend"
			if model == "et9500":
				model = "et9x00"
		elif model.startswith("ini"):
			if model.endswith("sv"):
				brand = "MiracleBox"
				if model == "ini-5000sv":
					model = "Premium Twin"
				elif model == "ini-1000sv":
					model = "Premium Mini"
				else:
					model
			elif model.endswith("de"):
				brand = "Golden Interstar"
				if model == "ini-1000de":
					model = "Xpeed LX"
				elif model == "ini-9000de":
					model = "Xpeed LX3"
				else:
					model
			elif model.endswith("ru"):
				brand = "Sezam"
				if model == "ini-1000ru":
					model = "Sezam 1000-HD"
				elif model == "ini-5000ru":
					model = "Sezam 5000-HD"
				elif model == "ini-9000ru":
					model = "Sezam Marvel"
				else:
					model
			else:
				brand = "Venton"
		elif model == "xp1000":
			brand = "XP-Series"
		elif model == "xp1000s":
			brand = "Octagon"
			model = "SF8 HD"
		elif model == "odinm9":
			brand = "Odin-Series"
		elif model == "odinm7":
			if getDistro() == 'axassupport':
				brand = "AXAS"
				model = "Class M"
			elif getBoxType() == 'odinm6':
				brand = "TELESTAR"
				model = "STARSAT LX"
			elif getMachineName() == 'AX-Odin':
				brand = "Opticum"
				model = "AX-Odin"	
			else:
				brand = "Odin-Series"
		elif model == "e3hd":
			if getDistro() == 'axassupport':
				brand = "AXAS"
				model = "Class E"
			else:
				brand = "E3-Series"
		elif model == "ebox5000":
			brand = "MixOs-Series"
			model = "MixOs F5"
		elif model == "ebox5100":
			brand = "MixOs-Series"
			model = "MixOs F5mini"
		elif model == "ebox7358":
			brand = "MixOs-Series"
			model = "MixOs F7"
		elif model.startswith("ixuss"):
			brand = "Ixuss-Series"
			chipset = "BCM7405"
	elif fileExists("/proc/stb/info/azmodel"):
		brand = "AZBOX"
		file = open("/proc/stb/info/model")
		model = file.read().strip().lower()
		file.close()
		if model == "me":
			chipset = "SIGMA 8655"
		elif model == "minime":
			chipset = "SIGMA 8653"
		else:
			chipset = "SIGMA 8634"
	elif fileExists("/proc/stb/info/vumodel"):
		brand = "Vu Plus"
		file = open("/proc/stb/info/vumodel")
		model = file.read().strip().lower()
		file.close()
	else:
		file = open("/proc/stb/info/model")
		model = file.read().strip().lower()
 		if model.startswith('spar'):
		    brand = "Spark"
		file.close()

	info['brand'] = brand
	info['model'] = model

	if fileExists("/proc/stb/info/chipset"):
		f = open("/proc/stb/info/chipset",'r')
		chipset = f.readline().strip()
		f.close()

	info['chipset'] = chipset

	memFree = 0
	file = open("/proc/meminfo",'r')
	for line in file:
		parts = line.split(':')
		key = parts[0].strip()
		if key == "MemTotal":
			info['mem1'] = parts[1].strip()
		elif key in ("MemFree", "Buffers", "Cached"):
			memFree += int(parts[1].strip().split(' ',1)[0])
	info['mem2'] = "%s kB" % memFree
	file.close()

	try:
		f = open("/proc/uptime", "rb")
		uptime = int(float(f.readline().split(' ', 2)[0].strip()))
		f.close()
		uptimetext = ''
		if uptime > 86400:
			d = uptime/86400
			uptime = uptime % 86400
			uptimetext += '%dd ' % d
		uptimetext += "%d:%.2d" % (uptime/3600, (uptime%3600)/60)
	except:
		uptimetext = "?"
	info['uptime'] = uptimetext

	info["webifver"] = getOpenWebifVer()
	try:
		from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
		info['imagever'] = getImageVersionString() + '.' + getBuildVersionString()
		info['enigmaver'] = getEnigmaVersionString()
	except:
		info['imagever'] = about.getImageVersionString()
		info['enigmaver'] = about.getEnigmaVersionString()
	info['kernelver'] = about.getKernelVersionString()

	try:
		from Tools.StbHardware import getFPVersion
	except ImportError:
		from Tools.DreamboxHardware import getFPVersion

	info['fp_version'] = getFPVersion()

	info['tuners'] = []
	for i in range(0, nimmanager.getSlotCount()):
		info['tuners'].append({
			"name": nimmanager.getNim(i).getSlotName(),
			"type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")"
		})

	info['ifaces'] = []
	ifaces = iNetwork.getConfiguredAdapters()
	for iface in ifaces:
		info['ifaces'].append({
			"name": iNetwork.getAdapterName(iface),
			"mac": iNetwork.getAdapterAttribute(iface, "mac"),
			"dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"),
			"ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
			"mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
			"gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway"))
		})

	info['hdd'] = []
	for hdd in harddiskmanager.hdd:
		if hdd.free() <= 1024:
			free = "%i MB" % (hdd.free())
		else:
			free = float(hdd.free()) / float(1024)
			free = "%.3f GB" % free
		info['hdd'].append({
			"model": hdd.model(),
			"capacity": hdd.capacity(),
			"free": free
		})
	return info
コード例 #24
0
ファイル: About.py プロジェクト: Ophiuchus1312/enigma2-master
    def __init__(self, session, parent):
        Screen.__init__(self, session, parent=parent)
        self["selected"] = StaticText("openATV:" + getImageVersionString())

        AboutText = ""
        model = None

        if getBoxType() == 'vuuno':
            model = "Vu+ Uno"
        elif getBoxType() == 'vuultimo':
            model = "Vu+ Ultimo"
        elif getBoxType() == 'vusolo':
            model = "Vu+ Solo"
        elif getBoxType() == 'vusolo2':
            model = "Vu+ Solo" + chr(178)
        elif getBoxType() == 'vuduo':
            model = "Vu+ Duo"
        elif getBoxType() == 'vuduo2':
            model = "Vu+ Duo" + chr(178)
        elif getBoxType() == 'et4x00':
            model = "Xtrend ET4x00 Series"
        elif getBoxType() == 'et5x00':
            model = "Xtrend ET5x00 Series"
        elif getBoxType() == 'et6x00':
            model = "Xtrend ET6x00 Series"
        elif getBoxType() == 'et9x00':
            model = "Xtrend ET9x00 Series"
        elif getBoxType() == 'odinm7':
            model = "Odin M7"
        elif getBoxType() == 'odinm9':
            model = "Odin M9"
        elif getBoxType() == 'gb800solo':
            model = "GigaBlue HD 800 Solo"
        elif getBoxType() == 'gb800se':
            model = "GigaBlue HD 800 SE"
        elif getBoxType() == 'gb800ue':
            model = "GigaBlue HD 800 UE"
        elif getBoxType() == 'gbquad':
            model = "GigaBlue HD Quad"
        elif getBoxType() == 'ventonhdx':
            model = "Venton Unibox HDx"
        elif getBoxType() == 'ventonhde':
            model = "Venton Unibox HDe"
        elif getBoxType() == 'ixussone':
            model = "Ixuss One"
        elif getBoxType() == 'ixusszero':
            model = "Ixuss Zero"
        elif getBoxType() == 'ixussduo':
            model = "Ixuss Duo"
        elif getBoxType() == 'tmtwin':
            model = "Technomate Twin"
        elif getBoxType() == 'tm2t':
            model = "Technomate 2T"
        elif getBoxType() == 'tmsingle':
            model = "Technomate Single"
        elif getBoxType() == 'tmnano':
            model = "Technomate Nano OE"
        elif getBoxType() == 'iqonios100hd':
            model = "iqon IOS 100HD"
        elif getBoxType() == 'iqonios200hd':
            model = "iqon IOS 200HD"
        elif getBoxType() == 'iqonios300hd':
            model = "iqon IOS 300HD"
        elif getBoxType() == 'xp1000':
            model = "XP1000"
        elif getBoxType() == 'ebox5000':
            model = "MixOS F5"
        elif getBoxType() == 'ebox5100':
            model = "MixOS F5mini"
        elif getBoxType() == 'dm500hd':
            model = "DREAMBOX DM500HD"
        elif getBoxType() == 'dm800':
            model = "DREAMBOX DM800HD"
        elif getBoxType() == 'dm800se':
            model = "DREAMBOX DM800se"
        elif getBoxType() == 'dm7020hd':
            model = "DREAMBOX DM7020HD"
        elif getBoxType() == 'dm8000':
            model = "DREAMBOX DM8000HD"
        else:
            model = getBoxType()

        if model:
            AboutText += _("Model: %s") % model + "\n"

        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") % getImageVersionString() + "\n"
        AboutText += _("Build: %s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        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)
コード例 #25
0
ファイル: About.py プロジェクト: Ophiuchus1312/enigma2-master
    def populate(self):
        self["lab1"] = StaticText(_("openATV"))
        self["lab2"] = StaticText(_("By openATV Image Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
        if getBoxType() == 'vuuno':
            model = "Vu+ Uno"
        elif getBoxType() == 'vuultimo':
            model = "Vu+ Ultimo"
        elif getBoxType() == 'vusolo':
            model = "Vu+ Solo\n"
        elif getBoxType() == 'vusolo2':
            model = "Vu+ Solo" + chr(178)
        elif getBoxType() == 'vuduo':
            model = "Vu+ Duo"
        elif getBoxType() == 'vuduo2':
            model = "Vu+ Duo" + chr(178)
        elif getBoxType() == 'et4x00':
            model = "Xtrend ET4x00 Series"
        elif getBoxType() == 'et5x00':
            model = "Xtrend ET5x00 Series"
        elif getBoxType() == 'et6x00':
            model = "Xtrend ET6x00 Series"
        elif getBoxType() == 'et9x00':
            model = "Xtrend ET9x00 Series"
        elif getBoxType() == 'odinm7':
            model = "Odin M/"
        elif getBoxType() == 'odinm9':
            model = "Odin M9"
        elif getBoxType() == 'gb800solo':
            model = "GigaBlue HD 800 Solo"
        elif getBoxType() == 'gb800se':
            model = "GigaBlue HD 800 SE"
        elif getBoxType() == 'gb800ue':
            model = "GigaBlue HD 800 UE"
        elif getBoxType() == 'gbquad':
            model = "GigaBlue HD Quad"
        elif getBoxType() == 'ventonhdx':
            model = "Venton Unibox HDx"
        elif getBoxType() == 'ventonhde':
            model = "Venton Unibox HDe"
        elif getBoxType() == 'ixussone':
            model = "Ixuss One"
        elif getBoxType() == 'ixusszero':
            model = "Ixuss Zero"
        elif getBoxType() == 'ixussduo':
            model = "Ixuss Duo"
        elif getBoxType() == 'tmtwin':
            model = "Technomate Twin"
        elif getBoxType() == 'tm2t':
            model = "Technomate 2T"
        elif getBoxType() == 'tmsingle':
            model = "Technomate Single"
        elif getBoxType() == 'tmnano':
            model = "Technomate Nano OE"
        elif getBoxType() == 'iqonios100hd':
            model = "iqon IOS 100HD"
        elif getBoxType() == 'iqonios200hd':
            model = "iqon IOS 200HD"
        elif getBoxType() == 'iqonios300hd':
            model = "iqon IOS 300HD"
        elif getBoxType() == 'xp1000':
            model = "XP1000"
        elif getBoxType() == 'ebox5000':
            model = "MixOS F5"
        elif getBoxType() == 'ebox5100':
            model = "MixOS F5mini"
        elif getBoxType() == 'dm500hd':
            model = "DREAMBOX DM500HD"
        elif getBoxType() == 'dm800':
            model = "DREAMBOX DM800HD"
        elif getBoxType() == 'dm800se':
            model = "DREAMBOX DM800se"
        elif getBoxType() == 'dm7020hd':
            model = "DREAMBOX DM7020HD"
        elif getBoxType() == 'dm8000':
            model = "DREAMBOX DM8000HD"
        else:
            model = getBoxType()

        if model:
            AboutText += _("Model:\t%s") % model + "\n"

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower(
            ).replace('\n', '').replace('bcm', '') + "\n"

        AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
        AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

        AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
        AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s") % driversdate + "\n"

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            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"

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
コード例 #26
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/" + 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
コード例 #27
0
ファイル: plugin.py プロジェクト: TELE-TWIN/enigma2-plugins-1
    def updateStatus(self):
        print "[TVCharts] Status Update ..."
        self.DBStatusTimer.stop()

        if not config.plugins.tvcharts.enabled.value or Screens.Standby.inStandby:
            return

            # Get Channelname
        sref = self.session.nav.getCurrentlyPlayingServiceReference()
        if sref is not None:
            ref = eServiceReference(sref.toString())
            ref.setName("")
            serviceHandler = eServiceCenter.getInstance()
            info = serviceHandler.info(ref)
            channel_name = (
                info
                and info.getName(ref)
                .replace("\xc2\x86", "")
                .replace("\xc2\x87", "")
                .decode("utf-8", "ignore")
                .encode("utf-8")
                or ""
            )
            self.serviceref = ref.toString()
        else:
            channel_name = ""
            self.serviceref = ""

            # Get Event Info
        service = self.session.nav.getCurrentService()
        info = service and service.info()
        event = info and info.getEvent(0)
        event_name = event and event.getEventName() or ""
        event_description = ""
        event_begin = 0

        if event is not None:
            curEvent = parseEvent(event)
            event_begin = int(curEvent[0]) + (config.recording.margin_before.getValue() * 60)
            event_description = event.getExtendedDescription()

            # Get Box Info
        self.BoxID = iNetwork.getAdapterAttribute("eth0", "mac")
        self.DeviceName = HardwareInfo().get_device_name()
        try:
            from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString

            self.EnigmaVersion = getEnigmaVersionString()
            self.ImageVersion = getImageVersionString() + "." + getBuildVersionString()
        except:
            self.EnigmaVersion = about.getEnigmaVersionString()
            self.ImageVersion = about.getVersionString()

            # Get TimerList
        self.timerlist = ""
        if config.plugins.tvcharts.submittimers.value and self.LastTimerlistUpdate <= (time() - 1800):
            self.LastTimerlistUpdate = time()
            try:
                for timer in self.recordtimer.timer_list:
                    if timer.disabled == 0 and timer.justplay == 0:
                        self.timerlist += "%s|%s|%s|%s|%s|%s|%s\n" % (
                            timer.eit,
                            str(int(timer.begin) + (config.recording.margin_before.getValue() * 60)),
                            str(int(timer.end) - (config.recording.margin_after.getValue() * 60)),
                            str(timer.service_ref),
                            timer.name,
                            timer.service_ref.getServiceName()
                            .replace("\xc2\x86", "")
                            .replace("\xc2\x87", "")
                            .decode("utf-8", "ignore")
                            .encode("utf-8"),
                            timer.repeated,
                        )
            except Exception:
                print "[TVCharts] Error loading timers!"

                # Get Pluginlist
        if config.plugins.tvcharts.submitplugins.value and self.pluginlist == "":
            try:
                os_system("opkg list_installed | grep enigma2-plugin- > /tmp/plugins.txt")
                for plugin in open("/tmp/plugins.txt", "r"):
                    self.pluginlist += plugin[0 : plugin.find(" - ")] + "\n"
                os_system("rm -f /tmp/plugins.txt")
            except Exception:
                print "[TVCharts] Error loading plugins!"

                # Status Update
        getPage(
            url="http://www.dreambox-plugins.de/feeds/TVCharts/status.php",
            agent="Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)",
            timeout=60,
            method="POST",
            headers={"Content-Type": "application/x-www-form-urlencoded"},
            postdata=urlencode(
                {
                    "boxid": self.BoxID,
                    "devicename": self.DeviceName,
                    "imageversion": self.ImageVersion,
                    "enigmaversion": self.EnigmaVersion,
                    "lastchannel": channel_name,
                    "lastevent": event_name,
                    "eventdescr": event_description,
                    "lastbegin": event_begin,
                    "lastserviceref": self.serviceref,
                    "timerlist": self.timerlist,
                    "pluginlist": self.pluginlist,
                }
            ),
        ).addErrback(self.updateError)

        # Restart Timer
        self.DBStatusTimer.start(900000, True)
コード例 #28
0
ファイル: PluginBrowser.py プロジェクト: SIFTeam/enigma2-old
	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/" + 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()
コード例 #29
0
ファイル: ImageBackup.py プロジェクト: pappaalfio/enigma2
	def imageInfo(self):
		AboutText = _("Full Image Backup ")
		AboutText += _("By openATV Image Team") + "\n"
		AboutText += _("Support at") + " www.opena.tv\n\n"
		AboutText += _("[Image Info]\n")
		AboutText += _("Model: %s %s\n") % (getMachineBrand(), getMachineName())
		AboutText += _("Backup Date: %s\n") % strftime("%Y-%m-%d", localtime(self.START))

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset: BCM%s") % about.getChipSetString().lower().replace('\n','').replace('bcm','') + "\n"

		AboutText += _("CPU: %s") % about.getCPUString() + "\n"
		AboutText += _("Cores: %s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version: %s") % getImageVersionString() + "\n"
		AboutText += _("Build: %s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		AboutText += _("[Enigma2 Settings]\n")
		AboutText += commands.getoutput("cat /etc/enigma2/settings")
		AboutText += _("\n\n[User - bouquets (TV)]\n")
		try:
			f = open("/etc/enigma2/bouquets.tv","r")
			lines = f.readlines()
			f.close()
			for line in lines:
				if line.startswith("#SERVICE:"):
					bouqet = line.split()
					if len(bouqet) > 3:
						bouqet[3] = bouqet[3].replace('"','')
						f = open("/etc/enigma2/" + bouqet[3],"r")
						userbouqet = f.readline()
						AboutText += userbouqet.replace('#NAME ','')
						f.close()
		except:
			AboutText += "Error reading bouquets.tv"
			
		AboutText += _("\n[User - bouquets (RADIO)]\n")
		try:
			f = open("/etc/enigma2/bouquets.radio","r")
			lines = f.readlines()
			f.close()
			for line in lines:
				if line.startswith("#SERVICE:"):
					bouqet = line.split()
					if len(bouqet) > 3:
						bouqet[3] = bouqet[3].replace('"','')
						f = open("/etc/enigma2/" + bouqet[3],"r")
						userbouqet = f.readline()
						AboutText += userbouqet.replace('#NAME ','')
						f.close()
		except:
			AboutText += "Error reading bouquets.radio"

		AboutText += _("\n[Installed Plugins]\n")
		AboutText += commands.getoutput("opkg list_installed | grep enigma2-plugin-")

		return AboutText
コード例 #30
0
ファイル: About.py プロジェクト: Ophiuchus1312/enigma2-master
	def populate(self):
		self["lab1"] = StaticText(_("openATV"))
		self["lab2"] = StaticText(_("By openATV Image Team"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
		if getBoxType() == 'vuuno':
			model = "Vu+ Uno"
		elif getBoxType() == 'vuultimo':
			model = "Vu+ Ultimo"
		elif getBoxType() == 'vusolo':
			model = "Vu+ Solo\n"
		elif getBoxType() == 'vusolo2':
			model = "Vu+ Solo" + chr(178)
		elif getBoxType() == 'vuduo':
			model = "Vu+ Duo"
		elif getBoxType() == 'vuduo2':
			model = "Vu+ Duo" + chr(178)
		elif getBoxType() == 'et4x00':
			model = "Xtrend ET4x00 Series"			
		elif getBoxType() == 'et5x00':
			model = "Xtrend ET5x00 Series"
		elif getBoxType() == 'et6x00':
			model = "Xtrend ET6x00 Series"
		elif getBoxType() == 'et9x00':
			model = "Xtrend ET9x00 Series"
		elif getBoxType() == 'odinm7':
			model = "Odin M/"			
		elif getBoxType() == 'odinm9':
			model = "Odin M9"
		elif getBoxType() == 'gb800solo':
			model = "GigaBlue HD 800 Solo"
		elif getBoxType() == 'gb800se':
			model = "GigaBlue HD 800 SE"
		elif getBoxType() == 'gb800ue':
			model = "GigaBlue HD 800 UE"
		elif getBoxType() == 'gbquad':
			model = "GigaBlue HD Quad"
		elif getBoxType() == 'ventonhdx':
			model = "Venton Unibox HDx"
		elif getBoxType() == 'ventonhde':
			model = "Venton Unibox HDe"
		elif getBoxType() == 'ixussone':
			model = "Ixuss One"
		elif getBoxType() == 'ixusszero':
			model = "Ixuss Zero"
		elif getBoxType() == 'ixussduo':
			model = "Ixuss Duo"			
		elif getBoxType() == 'tmtwin':
			model = "Technomate Twin"
		elif getBoxType() == 'tm2t':
			model = "Technomate 2T"
		elif getBoxType() == 'tmsingle':
			model = "Technomate Single"
		elif getBoxType() == 'tmnano':
			model = "Technomate Nano OE"
		elif getBoxType() == 'iqonios100hd':
			model = "iqon IOS 100HD"
		elif getBoxType() == 'iqonios200hd':
			model = "iqon IOS 200HD"
		elif getBoxType() == 'iqonios300hd':
			model = "iqon IOS 300HD"
		elif getBoxType() == 'xp1000':
			model = "XP1000"
		elif getBoxType() == 'ebox5000':
			model = "MixOS F5"
		elif getBoxType() == 'ebox5100':
			model = "MixOS F5mini"
		elif getBoxType() == 'dm500hd':
			model = "DREAMBOX DM500HD"
		elif getBoxType() == 'dm800':
			model = "DREAMBOX DM800HD"
		elif getBoxType() == 'dm800se':
			model = "DREAMBOX DM800se"
		elif getBoxType() == 'dm7020hd':
			model = "DREAMBOX DM7020HD"
		elif getBoxType() == 'dm8000':
			model = "DREAMBOX DM8000HD"
		else:
			model = getBoxType()

		if model:
			AboutText += _("Model:\t%s") % model + "\n"

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower().replace('\n','').replace('bcm','') + "\n"

		AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
		AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			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"

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
コード例 #31
0
ファイル: About.py プロジェクト: Nobody28/enigma2
def getVersionString():
	return getImageVersionString()
コード例 #32
0
ファイル: About.py プロジェクト: drgogeta86/enigma2
	def populate(self):
		self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
		self["lab2"] = StaticText(_("By Team ViX"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk")
		if getBoxType() == 'vuuno':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vuultimo':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vusolo':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vusolo2':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vuduo':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vuduo2':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'et4x00':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk")
		elif getBoxType() == 'et5x00':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk")
		elif getBoxType() == 'et6x00':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk")
		elif getBoxType() == 'et9x00':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk")
		elif getBoxType() == 'odinm7':
			self["lab3"] = StaticText(_("Support at") + " www.odin-support.co.uk")
		elif getBoxType() == 'odinm9':
			self["lab3"] = StaticText(_("Support at") + " www.odin-support.co.uk")

		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower().replace('\n','').replace('bcm','') + "\n"

		AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
		AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"
		
		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			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"

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
コード例 #33
0
ファイル: ImageBackup.py プロジェクト: skywatcher111/enigma2
    def imageInfo(self):
        AboutText = _("Full Image Backup ")
        AboutText += _("By openATV Image Team") + "\n"
        AboutText += _("Support at") + " www.opena.tv\n\n"
        AboutText += _("[Image Info]\n")
        AboutText += _("Model: %s %s\n") % (getMachineBrand(),
                                            getMachineName())
        AboutText += _("Backup Date: %s\n") % strftime("%Y-%m-%d",
                                                       localtime(self.START))

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset: BCM%s") % about.getChipSetString().lower(
            ).replace('\n', '').replace('bcm', '') + "\n"

        AboutText += _("CPU: %s") % about.getCPUString() + "\n"
        AboutText += _("Cores: %s") % about.getCpuCoresString() + "\n"

        AboutText += _("Version: %s") % getImageVersionString() + "\n"
        AboutText += _("Build: %s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s") % driversdate + "\n"

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        AboutText += _("[Enigma2 Settings]\n")
        AboutText += commands.getoutput("cat /etc/enigma2/settings")
        AboutText += _("\n\n[User - bouquets (TV)]\n")
        try:
            f = open("/etc/enigma2/bouquets.tv", "r")
            lines = f.readlines()
            f.close()
            for line in lines:
                if line.startswith("#SERVICE:"):
                    bouqet = line.split()
                    if len(bouqet) > 3:
                        bouqet[3] = bouqet[3].replace('"', '')
                        f = open("/etc/enigma2/" + bouqet[3], "r")
                        userbouqet = f.readline()
                        AboutText += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            AboutText += "Error reading bouquets.tv"

        AboutText += _("\n[User - bouquets (RADIO)]\n")
        try:
            f = open("/etc/enigma2/bouquets.radio", "r")
            lines = f.readlines()
            f.close()
            for line in lines:
                if line.startswith("#SERVICE:"):
                    bouqet = line.split()
                    if len(bouqet) > 3:
                        bouqet[3] = bouqet[3].replace('"', '')
                        f = open("/etc/enigma2/" + bouqet[3], "r")
                        userbouqet = f.readline()
                        AboutText += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            AboutText += "Error reading bouquets.radio"

        AboutText += _("\n[Installed Plugins]\n")
        AboutText += commands.getoutput(
            "opkg list_installed | grep enigma2-plugin-")

        return AboutText
コード例 #34
0
ファイル: info.py プロジェクト: sklnet/e2openplugin-OpenWebif
def getInfo():
	# TODO: get webif versione somewhere!
	info = {}

	brand = "Dream Multimedia"
	model = "unknown"
	chipset = "unknown"

	if fileExists("/proc/stb/info/hwmodel"):
		file = open("/proc/stb/info/hwmodel")
		model = file.read().strip().lower()
		file.close()
		if model == "tmtwinoe":
			model = "TM-TWIN-OE"
			brand = "Technomate"
		elif model == "tm2toe":
			model = "TM-2T-OE"
			brand = "Technomate"
		elif model == "tmsingle":
			model = "TM-SINGLE"
			brand = "Technomate"
		elif model == "tmnanooe":
			model = "TM-NANO-OE"
			brand = "Technomate"
		elif model == "ios100hd":
			model = "IOS-100HD"
			brand = "Iqon"
		elif model == "ios200hd":
			model = "IOS-200HD"
			brand = "Iqon"
		elif model == "ios300hd":
			model = "IOS-300HD"
			brand = "Iqon"
		elif model == "optimussos1":
			model = "Optimuss-OS1"
			brand = "Edision"
		elif model == "optimussos2":
			model = "Optimuss-OS2"
			brand = "Edision"
	elif fileExists("/proc/stb/info/boxtype"):
		file = open("/proc/stb/info/boxtype")
		model = file.read().strip().lower()
		file.close()
		if model == "gigablue":
			brand = "GigaBlue"
			if fileExists("/proc/stb/info/gbmodel"):
				file = open("/proc/stb/info/gbmodel")
				model = file.read().strip().lower()
				file.close()
				if model == "quad":
					model = "gbquad"
			else:
				model = 'gb800solo'
		elif model.startswith("et"):
			brand = "Clarke-Xtrend"
			if model == "et9500":
				model = "et9x00"
		elif model.startswith("ini"):
			if model.endswith("sv"):
				brand = "MiracleBox"
				if model == "ini-5000sv":
					model = "Premium Twin"
				elif model == "ini-1000sv":
					model = "Premium Mini"
				else:
					model
			elif model.endswith("de"):
				brand = "Golden Interstar"
				if model == "ini-1000de":
					model = "Xpeed LX"
				elif model == "ini-9000de":
					model = "Xpeed LX3"
				else:
					model
			elif model.endswith("ru"):
				brand = "Sezam"
				if model == "ini-1000ru":
					model = "Sezam 1000-HD"
				elif model == "ini-5000ru":
					model = "Sezam 5000-HD"
				elif model == "ini-9000ru":
					model = "Sezam Marvel"
				else:
					model
			else:
				brand = "Venton"
		elif model == "xp1000":
			brand = "XP-Series"
		elif model == "xp1000s":
			brand = "Octagon"
			model = "SF8 HD"
		elif model == "odinm9":
			brand = "Odin-Series"
		elif model == "odinm7":
			if getDistro() == 'axassupport':
				brand = "AXAS"
				model = "Class M"
			elif getBoxType() == 'odinm6':
				brand = "TELESTAR"
				model = "STARSAT LX"
			elif getMachineName() == 'AX-Odin':
				brand = "Opticum"
				model = "AX-Odin"	
			else:
				brand = "Odin-Series"
		elif model == "e3hd":
			if getDistro() == 'axassupport':
				brand = "AXAS"
				model = "Class E"
			else:
				brand = "E3-Series"
		elif model == "ebox5000":
			brand = "MixOs-Series"
			model = "MixOs F5"
		elif model == "ebox5100":
			brand = "MixOs-Series"
			model = "MixOs F5mini"
		elif model == "ebox7358":
			brand = "MixOs-Series"
			model = "MixOs F7"
		elif model.startswith("ixuss"):
			brand = "Ixuss-Series"
			chipset = "BCM7405"
	elif fileExists("/proc/stb/info/azmodel"):
		brand = "AZBOX"
		file = open("/proc/stb/info/model")
		model = file.read().strip().lower()
		file.close()
		if model == "me":
			chipset = "SIGMA 8655"
		elif model == "minime":
			chipset = "SIGMA 8653"
		else:
			chipset = "SIGMA 8634"
	elif fileExists("/proc/stb/info/vumodel"):
		brand = "Vu Plus"
		file = open("/proc/stb/info/vumodel")
		model = file.read().strip().lower()
		file.close()
	else:
		file = open("/proc/stb/info/model")
		model = file.read().strip().lower()
 		if model.startswith('spar'):
		    brand = "Spark"
		file.close()

	info['brand'] = brand
	info['model'] = model

	if fileExists("/proc/stb/info/chipset"):
		f = open("/proc/stb/info/chipset",'r')
		chipset = f.readline().strip()
		f.close()

	info['chipset'] = chipset

	memFree = 0
	file = open("/proc/meminfo",'r')
	for line in file:
		parts = line.split(':')
		key = parts[0].strip()
		if key == "MemTotal":
			info['mem1'] = parts[1].strip()
		elif key in ("MemFree", "Buffers", "Cached"):
			memFree += int(parts[1].strip().split(' ',1)[0])
	info['mem2'] = "%s kB" % memFree
	file.close()

	try:
		f = open("/proc/uptime", "rb")
		uptime = int(float(f.readline().split(' ', 2)[0].strip()))
		f.close()
		uptimetext = ''
		if uptime > 86400:
			d = uptime/86400
			uptime = uptime % 86400
			uptimetext += '%dd ' % d
		uptimetext += "%d:%.2d" % (uptime/3600, (uptime%3600)/60)
	except:
		uptimetext = "?"
	info['uptime'] = uptimetext

	info["webifver"] = getOpenWebifVer()
	try:
		from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
		info['imagever'] = getImageVersionString() + '.' + getBuildVersionString()
		info['enigmaver'] = getEnigmaVersionString()
	except:
		info['imagever'] = about.getImageVersionString()
		info['enigmaver'] = about.getEnigmaVersionString()
	info['kernelver'] = about.getKernelVersionString()

	try:
		from Tools.StbHardware import getFPVersion
	except ImportError:
		from Tools.DreamboxHardware import getFPVersion

	info['fp_version'] = getFPVersion()

	info['tuners'] = []
	for i in range(0, nimmanager.getSlotCount()):
		info['tuners'].append({
			"name": nimmanager.getNim(i).getSlotName(),
			"type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")"
		})

	info['ifaces'] = []
	ifaces = iNetwork.getConfiguredAdapters()
	for iface in ifaces:
		info['ifaces'].append({
			"name": iNetwork.getAdapterName(iface),
			"mac": iNetwork.getAdapterAttribute(iface, "mac"),
			"dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"),
			"ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
			"mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
			"gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway"))
		})

	info['hdd'] = []
	for hdd in harddiskmanager.hdd:
		if hdd.free() <= 1024:
			free = "%i MB" % (hdd.free())
		else:
			free = float(hdd.free()) / float(1024)
			free = "%.3f GB" % free
		info['hdd'].append({
			"model": hdd.model(),
			"capacity": hdd.capacity(),
			"free": free
		})
	return info