mirror of
https://github.com/gutosie/neoboot.git
synced 2025-12-24 09:10:12 +01:00
Add files via upload
This commit is contained in:
@@ -48,11 +48,7 @@ import tempfile
|
||||
import struct
|
||||
|
||||
from enigma import eEPGCache, eEnv, eTimer, fbClass
|
||||
|
||||
try:
|
||||
from Tools.HardwareInfo import HardwareInfo
|
||||
except:
|
||||
from Plugins.Extensions.NeoBoot.files import HardwareInfo
|
||||
|
||||
try:
|
||||
from Screens.Standby import getReasons
|
||||
except:
|
||||
@@ -122,9 +118,11 @@ ACTION = 2
|
||||
|
||||
FEED_URLS = [
|
||||
("OpenViX", "https://www.openvix.co.uk/json/%s", "getMachineMake"),
|
||||
("OpenATV", "https://images.mynonpublic.com/openatv/json/%s", "getMachineMake"),
|
||||
("OpenATV", "https://images.mynonpublic.com/openatv/json/%s", "getMachineMake"),
|
||||
("OpenBH", "https://images.openbh.net/json/%s", "getMachineMake"),
|
||||
("OpenPLi", "http://downloads.openpli.org/json/%s", "HardwareInfo"),
|
||||
("OpenEight", "http://openeight.de/json/%s", "getMachineMake"),
|
||||
("OpenATV", "http://images.mynonpublic.com/openatv/nightly/json/%s", "getMachineMake"),
|
||||
]
|
||||
|
||||
|
||||
@@ -313,7 +311,7 @@ class ImageManager(Screen):
|
||||
|
||||
def showInfo(self):
|
||||
self.session.open(TextBox, self.infoText(), self.title + " - " + _("info"))
|
||||
|
||||
|
||||
|
||||
class ImageManagerDownload(Screen):
|
||||
skin = """
|
||||
@@ -851,4 +849,80 @@ class DownloadImageNeo(Screen):
|
||||
else:
|
||||
return 0
|
||||
|
||||
|
||||
from Tools.Directories import SCOPE_SKIN, resolveFilename
|
||||
from Components.SystemInfo import BoxInfo
|
||||
|
||||
hw_info = None
|
||||
|
||||
class HardwareInfo:
|
||||
device_name = _("unavailable")
|
||||
device_brandname = None
|
||||
device_version = ""
|
||||
device_revision = ""
|
||||
device_hdmi = False
|
||||
|
||||
def __init__(self):
|
||||
global hw_info
|
||||
if hw_info:
|
||||
return
|
||||
hw_info = self
|
||||
|
||||
print("[HardwareInfo] Scanning hardware info")
|
||||
# Version
|
||||
try:
|
||||
self.device_version = open("/proc/stb/info/version").read().strip()
|
||||
except:
|
||||
pass
|
||||
|
||||
# Revision
|
||||
try:
|
||||
self.device_revision = open("/proc/stb/info/board_revision").read().strip()
|
||||
except:
|
||||
pass
|
||||
|
||||
# Name ... bit odd, but history prevails
|
||||
try:
|
||||
self.device_name = open("/proc/stb/info/model").read().strip()
|
||||
except:
|
||||
pass
|
||||
|
||||
# Brandname ... bit odd, but history prevails
|
||||
self.device_brandname = BoxInfo.getItem("displaybrand")
|
||||
|
||||
# standard values
|
||||
self.machine_name = BoxInfo.getItem("machine") # This contains the value where the image is buld from
|
||||
self.device_model = BoxInfo.getItem("model") # This may contain more information about the specific model
|
||||
self.device_hw = BoxInfo.getItem("displaymodel")
|
||||
|
||||
if self.device_revision:
|
||||
self.device_string = "%s (%s-%s)" % (self.device_hw, self.device_revision, self.device_version)
|
||||
elif self.device_version:
|
||||
self.device_string = "%s (%s)" % (self.device_hw, self.device_version)
|
||||
else:
|
||||
self.device_string = self.device_hw
|
||||
|
||||
self.device_hdmi = BoxInfo.getItem('hdmi')
|
||||
|
||||
def get_device_name(self):
|
||||
return hw_info.device_name
|
||||
|
||||
def get_device_model(self):
|
||||
return hw_info.device_model
|
||||
|
||||
def get_device_version(self):
|
||||
return hw_info.device_version
|
||||
|
||||
def get_device_revision(self):
|
||||
return hw_info.device_revision
|
||||
|
||||
def get_device_string(self):
|
||||
return hw_info.device_string
|
||||
|
||||
def get_machine_name(self):
|
||||
return hw_info.machine_name
|
||||
|
||||
def has_hdmi(self):
|
||||
return hw_info.device_hdmi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user