mirror of
https://github.com/gutosie/neoboot.git
synced 2025-10-27 09:26:06 +01:00
PEP8 double aggressive E301 ~ E306
This commit is contained in:
@@ -8,6 +8,7 @@ import gettext
|
|||||||
PluginLanguageDomain = 'NeoBoot'
|
PluginLanguageDomain = 'NeoBoot'
|
||||||
PluginLanguagePath = 'Extensions/NeoBoot/locale'
|
PluginLanguagePath = 'Extensions/NeoBoot/locale'
|
||||||
|
|
||||||
|
|
||||||
def localeInit():
|
def localeInit():
|
||||||
lang = language.getLanguage()[:2]
|
lang = language.getLanguage()[:2]
|
||||||
os.environ['LANGUAGE'] = lang
|
os.environ['LANGUAGE'] = lang
|
||||||
|
|||||||
@@ -8,9 +8,12 @@ import shutil
|
|||||||
|
|
||||||
# ver. gutosie
|
# ver. gutosie
|
||||||
#--------------------------------------------- 2021 ---------------------------------------------#
|
#--------------------------------------------- 2021 ---------------------------------------------#
|
||||||
|
|
||||||
|
|
||||||
def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole):
|
def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole):
|
||||||
NEOBootR(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole)
|
NEOBootR(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole)
|
||||||
|
|
||||||
|
|
||||||
def LanguageUsed():
|
def LanguageUsed():
|
||||||
language = ''
|
language = ''
|
||||||
lang = open('/etc/enigma2/settings', 'r')
|
lang = open('/etc/enigma2/settings', 'r')
|
||||||
@@ -22,6 +25,7 @@ def LanguageUsed():
|
|||||||
language = 'No'
|
language = 'No'
|
||||||
return language
|
return language
|
||||||
|
|
||||||
|
|
||||||
def getBoxHostName():
|
def getBoxHostName():
|
||||||
if os.path.exists('/etc/hostname'):
|
if os.path.exists('/etc/hostname'):
|
||||||
with open('/etc/hostname', 'r') as f:
|
with open('/etc/hostname', 'r') as f:
|
||||||
@@ -29,6 +33,7 @@ def getBoxHostName():
|
|||||||
f.close()
|
f.close()
|
||||||
return myboxname
|
return myboxname
|
||||||
|
|
||||||
|
|
||||||
def getCPUSoC():
|
def getCPUSoC():
|
||||||
chipset = 'UNKNOWN'
|
chipset = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/stb/info/chipset'):
|
if os.path.exists('/proc/stb/info/chipset'):
|
||||||
@@ -40,6 +45,7 @@ def getCPUSoC():
|
|||||||
|
|
||||||
return chipset
|
return chipset
|
||||||
|
|
||||||
|
|
||||||
def getBoxVuModel():
|
def getBoxVuModel():
|
||||||
vumodel = 'UNKNOWN'
|
vumodel = 'UNKNOWN'
|
||||||
if os.path.exists("/proc/stb/info/vumodel") and not os.path.exists("/proc/stb/info/boxtype"):
|
if os.path.exists("/proc/stb/info/vumodel") and not os.path.exists("/proc/stb/info/boxtype"):
|
||||||
@@ -48,6 +54,7 @@ def getBoxVuModel():
|
|||||||
f.close()
|
f.close()
|
||||||
return vumodel
|
return vumodel
|
||||||
|
|
||||||
|
|
||||||
def getCPUtype():
|
def getCPUtype():
|
||||||
cpu = 'UNKNOWN'
|
cpu = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/cpuinfo'):
|
if os.path.exists('/proc/cpuinfo'):
|
||||||
@@ -60,12 +67,14 @@ def getCPUtype():
|
|||||||
cpu = 'MIPS'
|
cpu = 'MIPS'
|
||||||
return cpu
|
return cpu
|
||||||
|
|
||||||
|
|
||||||
def getKernelVersion():
|
def getKernelVersion():
|
||||||
try:
|
try:
|
||||||
return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0]
|
return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0]
|
||||||
except:
|
except:
|
||||||
return _('unknown')
|
return _('unknown')
|
||||||
|
|
||||||
|
|
||||||
def getNeoLocation():
|
def getNeoLocation():
|
||||||
locatino = 'UNKNOWN'
|
locatino = 'UNKNOWN'
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'):
|
||||||
@@ -672,6 +681,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan
|
|||||||
os.system('echo "End of installation:"; date +%T')
|
os.system('echo "End of installation:"; date +%T')
|
||||||
os.system('echo "If you want to save the installation process from the console press green."')
|
os.system('echo "If you want to save the installation process from the console press green."')
|
||||||
|
|
||||||
|
|
||||||
def RemoveUnpackDirs():
|
def RemoveUnpackDirs():
|
||||||
os.chdir(media + '/ImagesUpload')
|
os.chdir(media + '/ImagesUpload')
|
||||||
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/unpackedzip'):
|
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/unpackedzip'):
|
||||||
@@ -1007,7 +1017,6 @@ def NEOBootExtract(source, target, ZipDelete):
|
|||||||
os.chdir('osmini')
|
os.chdir('osmini')
|
||||||
brand = 'osmini'
|
brand = 'osmini'
|
||||||
|
|
||||||
|
|
||||||
#Instalacja image nandsim
|
#Instalacja image nandsim
|
||||||
os.system('echo "Instalacja - nandsim w toku..."')
|
os.system('echo "Instalacja - nandsim w toku..."')
|
||||||
rc = os.system('insmod /lib/modules/' + getKernelVersion() + '/kernel/drivers/mtd/nand/nandsim.ko cache_file=' + getNeoLocation() + 'image_cache first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15;sleep 5')#% getKernelVersion())
|
rc = os.system('insmod /lib/modules/' + getKernelVersion() + '/kernel/drivers/mtd/nand/nandsim.ko cache_file=' + getNeoLocation() + 'image_cache first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15;sleep 5')#% getKernelVersion())
|
||||||
|
|||||||
@@ -23,12 +23,14 @@ from Components.Label import Label
|
|||||||
from Components.Pixmap import Pixmap
|
from Components.Pixmap import Pixmap
|
||||||
from Screens.MessageBox import MessageBox
|
from Screens.MessageBox import MessageBox
|
||||||
|
|
||||||
|
|
||||||
def readFile(filename):
|
def readFile(filename):
|
||||||
file = open(filename)
|
file = open(filename)
|
||||||
data = file.read().strip()
|
data = file.read().strip()
|
||||||
file.close()
|
file.close()
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
def getProcMounts():
|
def getProcMounts():
|
||||||
try:
|
try:
|
||||||
mounts = open('/proc/mounts', 'r')
|
mounts = open('/proc/mounts', 'r')
|
||||||
@@ -69,6 +71,7 @@ def findMountPoint(path):
|
|||||||
DEVTYPE_UDEV = 0
|
DEVTYPE_UDEV = 0
|
||||||
DEVTYPE_DEVFS = 1
|
DEVTYPE_DEVFS = 1
|
||||||
|
|
||||||
|
|
||||||
class Harddisk():
|
class Harddisk():
|
||||||
|
|
||||||
def __init__(self, device, removable=False):
|
def __init__(self, device, removable=False):
|
||||||
@@ -1030,6 +1033,7 @@ class HarddiskFsckSelection(HarddiskSelection):
|
|||||||
|
|
||||||
harddiskmanager = HarddiskManager()
|
harddiskmanager = HarddiskManager()
|
||||||
|
|
||||||
|
|
||||||
def isSleepStateDevice(device):
|
def isSleepStateDevice(device):
|
||||||
ret = os.popen('hdparm -C %s' % device).read()
|
ret = os.popen('hdparm -C %s' % device).read()
|
||||||
if 'SG_IO' in ret or 'HDIO_DRIVE_CMD' in ret:
|
if 'SG_IO' in ret or 'HDIO_DRIVE_CMD' in ret:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from Tools.CList import CList
|
from Tools.CList import CList
|
||||||
|
|
||||||
|
|
||||||
class Job(object):
|
class Job(object):
|
||||||
NOT_STARTED, IN_PROGRESS, FINISHED, FAILED = range(4)
|
NOT_STARTED, IN_PROGRESS, FINISHED, FAILED = range(4)
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import gettext
|
|||||||
PluginLanguageDomain = 'NeoBoot'
|
PluginLanguageDomain = 'NeoBoot'
|
||||||
PluginLanguagePath = 'Extensions/NeoBoot/locale'
|
PluginLanguagePath = 'Extensions/NeoBoot/locale'
|
||||||
|
|
||||||
|
|
||||||
def localeInit():
|
def localeInit():
|
||||||
lang = language.getLanguage()[:2]
|
lang = language.getLanguage()[:2]
|
||||||
os.environ['LANGUAGE'] = lang
|
os.environ['LANGUAGE'] = lang
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ class ManagerDevice(Screen):
|
|||||||
<widget name="lab1" zPosition="2" position="29,111" size="699,40" font="Regular;22" halign="center" transparent="1" />
|
<widget name="lab1" zPosition="2" position="29,111" size="699,40" font="Regular;22" halign="center" transparent="1" />
|
||||||
</screen>"""
|
</screen>"""
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
Screen.setTitle(self, _('Mount Manager'))
|
Screen.setTitle(self, _('Mount Manager'))
|
||||||
@@ -499,9 +498,6 @@ class DevicesConf(Screen, ConfigListScreen):
|
|||||||
# out2.close()
|
# out2.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#SetDiskLabel - dziekuje autorowi
|
#SetDiskLabel - dziekuje autorowi
|
||||||
class SetDiskLabel(Screen):
|
class SetDiskLabel(Screen):
|
||||||
screenwidth = getDesktop(0).size().width()
|
screenwidth = getDesktop(0).size().width()
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
|||||||
|
|
||||||
LogFileObj = None
|
LogFileObj = None
|
||||||
|
|
||||||
|
|
||||||
def Log(param=''):
|
def Log(param=''):
|
||||||
global LogFileObj
|
global LogFileObj
|
||||||
#first close object if exists
|
#first close object if exists
|
||||||
@@ -37,22 +38,27 @@ def Log(param=''):
|
|||||||
LogFileObj.flush()
|
LogFileObj.flush()
|
||||||
return LogFileObj
|
return LogFileObj
|
||||||
|
|
||||||
|
|
||||||
def clearMemory():
|
def clearMemory():
|
||||||
with open("/proc/sys/vm/drop_caches", "w") as f:
|
with open("/proc/sys/vm/drop_caches", "w") as f:
|
||||||
f.write("1\n")
|
f.write("1\n")
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
def LogCrashGS(line):
|
def LogCrashGS(line):
|
||||||
log_file = open('%sImageBoot/neoboot.log' % getNeoLocation(), 'a')
|
log_file = open('%sImageBoot/neoboot.log' % getNeoLocation(), 'a')
|
||||||
log_file.write(line)
|
log_file.write(line)
|
||||||
log_file.close()
|
log_file.close()
|
||||||
|
|
||||||
|
|
||||||
def fileCheck(f, mode='r'):
|
def fileCheck(f, mode='r'):
|
||||||
return fileExists(f, mode) and f
|
return fileExists(f, mode) and f
|
||||||
|
|
||||||
# if not IsImageName():
|
# if not IsImageName():
|
||||||
# from Components.PluginComponent import plugins
|
# from Components.PluginComponent import plugins
|
||||||
# plugins.reloadPlugins()
|
# plugins.reloadPlugins()
|
||||||
|
|
||||||
|
|
||||||
def IsImageName():
|
def IsImageName():
|
||||||
if fileExists("/etc/issue"):
|
if fileExists("/etc/issue"):
|
||||||
for line in open("/etc/issue"):
|
for line in open("/etc/issue"):
|
||||||
@@ -60,6 +66,7 @@ def IsImageName():
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def mountp():
|
def mountp():
|
||||||
pathmp = []
|
pathmp = []
|
||||||
if os.path.isfile('/proc/mounts'):
|
if os.path.isfile('/proc/mounts'):
|
||||||
@@ -71,6 +78,7 @@ def mountp():
|
|||||||
pathmp.append('/tmp/')
|
pathmp.append('/tmp/')
|
||||||
return pathmp
|
return pathmp
|
||||||
|
|
||||||
|
|
||||||
def getSupportedTuners():
|
def getSupportedTuners():
|
||||||
supportedT = ''
|
supportedT = ''
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/stbinfo.cfg'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/stbinfo.cfg'):
|
||||||
@@ -81,6 +89,7 @@ def getSupportedTuners():
|
|||||||
supportedT = '%s' % getBoxHostName()
|
supportedT = '%s' % getBoxHostName()
|
||||||
return supportedT
|
return supportedT
|
||||||
|
|
||||||
|
|
||||||
def getFreespace(dev):
|
def getFreespace(dev):
|
||||||
statdev = os.statvfs(dev)
|
statdev = os.statvfs(dev)
|
||||||
space = statdev.f_bavail * statdev.f_frsize / 1024
|
space = statdev.f_bavail * statdev.f_frsize / 1024
|
||||||
@@ -88,6 +97,8 @@ def getFreespace(dev):
|
|||||||
return space
|
return space
|
||||||
|
|
||||||
#check install
|
#check install
|
||||||
|
|
||||||
|
|
||||||
def getCheckInstal1():
|
def getCheckInstal1():
|
||||||
neocheckinstal = 'UNKNOWN'
|
neocheckinstal = 'UNKNOWN'
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install'):
|
||||||
@@ -98,6 +109,7 @@ def getCheckInstal1():
|
|||||||
neocheckinstal = '1'
|
neocheckinstal = '1'
|
||||||
return neocheckinstal
|
return neocheckinstal
|
||||||
|
|
||||||
|
|
||||||
def getCheckInstal2():
|
def getCheckInstal2():
|
||||||
neocheckinstal = 'UNKNOWN'
|
neocheckinstal = 'UNKNOWN'
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'):
|
||||||
@@ -108,6 +120,7 @@ def getCheckInstal2():
|
|||||||
neocheckinstal = '2'
|
neocheckinstal = '2'
|
||||||
return neocheckinstal
|
return neocheckinstal
|
||||||
|
|
||||||
|
|
||||||
def getCheckInstal3():
|
def getCheckInstal3():
|
||||||
neocheckinstal = 'UNKNOWN'
|
neocheckinstal = 'UNKNOWN'
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh'):
|
||||||
@@ -120,6 +133,8 @@ def getCheckInstal3():
|
|||||||
return neocheckinstal
|
return neocheckinstal
|
||||||
|
|
||||||
#check imageATV
|
#check imageATV
|
||||||
|
|
||||||
|
|
||||||
def getImageATv():
|
def getImageATv():
|
||||||
atvimage = 'UNKNOWN'
|
atvimage = 'UNKNOWN'
|
||||||
if os.path.exists('/etc/issue.net'):
|
if os.path.exists('/etc/issue.net'):
|
||||||
@@ -131,6 +146,8 @@ def getImageATv():
|
|||||||
return atvimage
|
return atvimage
|
||||||
|
|
||||||
#check install
|
#check install
|
||||||
|
|
||||||
|
|
||||||
def getNeoLocation():
|
def getNeoLocation():
|
||||||
locatino = 'UNKNOWN'
|
locatino = 'UNKNOWN'
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'):
|
||||||
@@ -177,6 +194,8 @@ def getNEO_filesystems():
|
|||||||
return neo_filesystems
|
return neo_filesystems
|
||||||
|
|
||||||
#typ procesora arm lub mips
|
#typ procesora arm lub mips
|
||||||
|
|
||||||
|
|
||||||
def getCPUtype():
|
def getCPUtype():
|
||||||
cpu = 'UNKNOWN'
|
cpu = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/cpuinfo'):
|
if os.path.exists('/proc/cpuinfo'):
|
||||||
@@ -190,6 +209,8 @@ def getCPUtype():
|
|||||||
return cpu
|
return cpu
|
||||||
|
|
||||||
#check install
|
#check install
|
||||||
|
|
||||||
|
|
||||||
def getFSTAB():
|
def getFSTAB():
|
||||||
install = 'UNKNOWN'
|
install = 'UNKNOWN'
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/reading_blkid'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/reading_blkid'):
|
||||||
@@ -202,6 +223,7 @@ def getFSTAB():
|
|||||||
install = 'NOUUID'
|
install = 'NOUUID'
|
||||||
return install
|
return install
|
||||||
|
|
||||||
|
|
||||||
def getFSTAB2():
|
def getFSTAB2():
|
||||||
install = 'UNKNOWN'
|
install = 'UNKNOWN'
|
||||||
if os.path.exists('/etc/fstab'):
|
if os.path.exists('/etc/fstab'):
|
||||||
@@ -214,6 +236,7 @@ def getFSTAB2():
|
|||||||
install = 'NOUUID'
|
install = 'NOUUID'
|
||||||
return install
|
return install
|
||||||
|
|
||||||
|
|
||||||
def getINSTALLNeo():
|
def getINSTALLNeo():
|
||||||
neoinstall = 'UNKNOWN'
|
neoinstall = 'UNKNOWN'
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/installNeo'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/installNeo'):
|
||||||
@@ -261,6 +284,7 @@ def getLocationMultiboot():
|
|||||||
|
|
||||||
return LocationMultiboot
|
return LocationMultiboot
|
||||||
|
|
||||||
|
|
||||||
def getLabelDisck():
|
def getLabelDisck():
|
||||||
label = 'UNKNOWN'
|
label = 'UNKNOWN'
|
||||||
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/reading_blkid'):
|
if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/reading_blkid'):
|
||||||
@@ -272,6 +296,8 @@ def getLabelDisck():
|
|||||||
return label
|
return label
|
||||||
|
|
||||||
#checking device neo
|
#checking device neo
|
||||||
|
|
||||||
|
|
||||||
def getNeoMount():
|
def getNeoMount():
|
||||||
neo = 'UNKNOWN'
|
neo = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/mounts'):
|
if os.path.exists('/proc/mounts'):
|
||||||
@@ -297,6 +323,7 @@ def getNeoMount():
|
|||||||
|
|
||||||
return neo
|
return neo
|
||||||
|
|
||||||
|
|
||||||
def getNeoMount2():
|
def getNeoMount2():
|
||||||
neo = 'UNKNOWN'
|
neo = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/mounts'):
|
if os.path.exists('/proc/mounts'):
|
||||||
@@ -334,6 +361,7 @@ def getNeoMount2():
|
|||||||
|
|
||||||
return neo
|
return neo
|
||||||
|
|
||||||
|
|
||||||
def getNeoMount3():
|
def getNeoMount3():
|
||||||
neo = 'UNKNOWN'
|
neo = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/mounts'):
|
if os.path.exists('/proc/mounts'):
|
||||||
@@ -346,6 +374,7 @@ def getNeoMount3():
|
|||||||
neo = 'cf_install_/dev/sdb1'
|
neo = 'cf_install_/dev/sdb1'
|
||||||
return neo
|
return neo
|
||||||
|
|
||||||
|
|
||||||
def getNeoMount4():
|
def getNeoMount4():
|
||||||
neo = 'UNKNOWN'
|
neo = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/mounts'):
|
if os.path.exists('/proc/mounts'):
|
||||||
@@ -358,6 +387,7 @@ def getNeoMount4():
|
|||||||
neo = 'card_install_/dev/sdb1'
|
neo = 'card_install_/dev/sdb1'
|
||||||
return neo
|
return neo
|
||||||
|
|
||||||
|
|
||||||
def getNeoMount5():
|
def getNeoMount5():
|
||||||
neo = 'UNKNOWN'
|
neo = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/mounts'):
|
if os.path.exists('/proc/mounts'):
|
||||||
@@ -382,6 +412,7 @@ def getCPUSoC():
|
|||||||
chipset = '7405'
|
chipset = '7405'
|
||||||
return chipset
|
return chipset
|
||||||
|
|
||||||
|
|
||||||
def getCPUSoCModel():
|
def getCPUSoCModel():
|
||||||
devicetree = 'UNKNOWN'
|
devicetree = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/device-tree/model'):
|
if os.path.exists('/proc/device-tree/model'):
|
||||||
@@ -391,6 +422,8 @@ def getCPUSoCModel():
|
|||||||
return devicetree
|
return devicetree
|
||||||
|
|
||||||
#zwraca wybrane image w neoboot do uruchomienia
|
#zwraca wybrane image w neoboot do uruchomienia
|
||||||
|
|
||||||
|
|
||||||
def getImageNeoBoot():
|
def getImageNeoBoot():
|
||||||
imagefile = 'UNKNOWN'
|
imagefile = 'UNKNOWN'
|
||||||
if os.path.exists('%sImageBoot/.neonextboot' % getNeoLocation()):
|
if os.path.exists('%sImageBoot/.neonextboot' % getNeoLocation()):
|
||||||
@@ -400,6 +433,8 @@ def getImageNeoBoot():
|
|||||||
return imagefile
|
return imagefile
|
||||||
|
|
||||||
#zwraca model vuplus
|
#zwraca model vuplus
|
||||||
|
|
||||||
|
|
||||||
def getBoxVuModel():
|
def getBoxVuModel():
|
||||||
vumodel = 'UNKNOWN'
|
vumodel = 'UNKNOWN'
|
||||||
if fileExists("/proc/stb/info/vumodel") and not fileExists("/proc/stb/info/boxtype"):
|
if fileExists("/proc/stb/info/vumodel") and not fileExists("/proc/stb/info/boxtype"):
|
||||||
@@ -412,6 +447,7 @@ def getBoxVuModel():
|
|||||||
f.close()
|
f.close()
|
||||||
return vumodel
|
return vumodel
|
||||||
|
|
||||||
|
|
||||||
def getVuModel():
|
def getVuModel():
|
||||||
if fileExists("/proc/stb/info/vumodel") and not fileExists("/proc/stb/info/boxtype"):
|
if fileExists("/proc/stb/info/vumodel") and not fileExists("/proc/stb/info/boxtype"):
|
||||||
brand = "Vu+"
|
brand = "Vu+"
|
||||||
@@ -422,6 +458,8 @@ def getVuModel():
|
|||||||
return model
|
return model
|
||||||
|
|
||||||
#zwraca nazwe stb z pliku hostname
|
#zwraca nazwe stb z pliku hostname
|
||||||
|
|
||||||
|
|
||||||
def getBoxHostName():
|
def getBoxHostName():
|
||||||
if os.path.exists('/etc/hostname'):
|
if os.path.exists('/etc/hostname'):
|
||||||
with open('/etc/hostname', 'r') as f:
|
with open('/etc/hostname', 'r') as f:
|
||||||
@@ -430,6 +468,8 @@ def getBoxHostName():
|
|||||||
return myboxname
|
return myboxname
|
||||||
|
|
||||||
#zwraca vuplus/vumodel
|
#zwraca vuplus/vumodel
|
||||||
|
|
||||||
|
|
||||||
def getTunerModel(): #< neoboot.py
|
def getTunerModel(): #< neoboot.py
|
||||||
BOX_NAME = ''
|
BOX_NAME = ''
|
||||||
if os.path.isfile('/proc/stb/info/vumodel') and not os.path.isfile("/proc/stb/info/boxtype"):
|
if os.path.isfile('/proc/stb/info/vumodel') and not os.path.isfile("/proc/stb/info/boxtype"):
|
||||||
@@ -442,6 +482,8 @@ def getTunerModel(): #< neoboot.py
|
|||||||
return BOX_NAME
|
return BOX_NAME
|
||||||
|
|
||||||
#zwraca strukture folderu zip - vuplus/vumodel
|
#zwraca strukture folderu zip - vuplus/vumodel
|
||||||
|
|
||||||
|
|
||||||
def getImageFolder():
|
def getImageFolder():
|
||||||
if os.path.isfile('/proc/stb/info/vumodel'):
|
if os.path.isfile('/proc/stb/info/vumodel'):
|
||||||
BOX_NAME = getBoxModelVU()
|
BOX_NAME = getBoxModelVU()
|
||||||
@@ -449,6 +491,8 @@ def getImageFolder():
|
|||||||
return ImageFolder
|
return ImageFolder
|
||||||
|
|
||||||
#zwraca nazwe kernela z /lib/modules
|
#zwraca nazwe kernela z /lib/modules
|
||||||
|
|
||||||
|
|
||||||
def getKernelVersion():
|
def getKernelVersion():
|
||||||
try:
|
try:
|
||||||
return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0]
|
return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0]
|
||||||
@@ -456,6 +500,8 @@ def getKernelVersion():
|
|||||||
return _('unknown')
|
return _('unknown')
|
||||||
|
|
||||||
# czysci pamiec
|
# czysci pamiec
|
||||||
|
|
||||||
|
|
||||||
def runCMDS(cmdsList):
|
def runCMDS(cmdsList):
|
||||||
clearMemory()
|
clearMemory()
|
||||||
if isinstance(cmdsList, (list, tuple)):
|
if isinstance(cmdsList, (list, tuple)):
|
||||||
@@ -493,7 +539,6 @@ def getImageDistroN():
|
|||||||
elif fileExists('/.multinfo') and fileExists('/etc/vtiversion.info'):
|
elif fileExists('/.multinfo') and fileExists('/etc/vtiversion.info'):
|
||||||
image = 'Flash ' + ' ' + getBoxHostName()
|
image = 'Flash ' + ' ' + getBoxHostName()
|
||||||
|
|
||||||
|
|
||||||
elif fileExists('/usr/lib/enigma2/python/boxbranding.so') and not fileExists('/.multinfo'):
|
elif fileExists('/usr/lib/enigma2/python/boxbranding.so') and not fileExists('/.multinfo'):
|
||||||
from boxbranding import getImageDistro
|
from boxbranding import getImageDistro
|
||||||
image = getImageDistro()
|
image = getImageDistro()
|
||||||
@@ -535,6 +580,7 @@ def getKernelImageVersion():
|
|||||||
|
|
||||||
return kernelimage
|
return kernelimage
|
||||||
|
|
||||||
|
|
||||||
def getTypBoxa():
|
def getTypBoxa():
|
||||||
if not fileExists('/etc/typboxa'):
|
if not fileExists('/etc/typboxa'):
|
||||||
os.system('touch /etc/typboxa')
|
os.system('touch /etc/typboxa')
|
||||||
@@ -610,6 +656,7 @@ def getTypBoxa():
|
|||||||
|
|
||||||
return typboxa
|
return typboxa
|
||||||
|
|
||||||
|
|
||||||
def getImageVersionString():
|
def getImageVersionString():
|
||||||
try:
|
try:
|
||||||
if os.path.isfile('/var/lib/opkg/status'):
|
if os.path.isfile('/var/lib/opkg/status'):
|
||||||
@@ -624,6 +671,7 @@ def getImageVersionString():
|
|||||||
|
|
||||||
return _('unavailable')
|
return _('unavailable')
|
||||||
|
|
||||||
|
|
||||||
def getModelString():
|
def getModelString():
|
||||||
try:
|
try:
|
||||||
file = open('/proc/stb/info/boxtype', 'r')
|
file = open('/proc/stb/info/boxtype', 'r')
|
||||||
@@ -633,6 +681,7 @@ def getModelString():
|
|||||||
except IOError:
|
except IOError:
|
||||||
return 'unknown'
|
return 'unknown'
|
||||||
|
|
||||||
|
|
||||||
def getChipSetString():
|
def getChipSetString():
|
||||||
try:
|
try:
|
||||||
f = open('/proc/stb/info/chipset', 'r')
|
f = open('/proc/stb/info/chipset', 'r')
|
||||||
@@ -642,6 +691,7 @@ def getChipSetString():
|
|||||||
except IOError:
|
except IOError:
|
||||||
return 'unavailable'
|
return 'unavailable'
|
||||||
|
|
||||||
|
|
||||||
def getCPUString():
|
def getCPUString():
|
||||||
try:
|
try:
|
||||||
file = open('/proc/cpuinfo', 'r')
|
file = open('/proc/cpuinfo', 'r')
|
||||||
@@ -660,6 +710,7 @@ def getCPUString():
|
|||||||
except IOError:
|
except IOError:
|
||||||
return 'unavailable'
|
return 'unavailable'
|
||||||
|
|
||||||
|
|
||||||
def getCpuCoresString():
|
def getCpuCoresString():
|
||||||
try:
|
try:
|
||||||
file = open('/proc/cpuinfo', 'r')
|
file = open('/proc/cpuinfo', 'r')
|
||||||
@@ -679,6 +730,7 @@ def getCpuCoresString():
|
|||||||
except IOError:
|
except IOError:
|
||||||
return 'unavailable'
|
return 'unavailable'
|
||||||
|
|
||||||
|
|
||||||
def getEnigmaVersionString():
|
def getEnigmaVersionString():
|
||||||
import enigma
|
import enigma
|
||||||
enigma_version = enigma.getEnigmaVersionString()
|
enigma_version = enigma.getEnigmaVersionString()
|
||||||
@@ -686,6 +738,7 @@ def getEnigmaVersionString():
|
|||||||
enigma_version = enigma_version[:-12]
|
enigma_version = enigma_version[:-12]
|
||||||
return enigma_version
|
return enigma_version
|
||||||
|
|
||||||
|
|
||||||
def getKernelVersionString():
|
def getKernelVersionString():
|
||||||
try:
|
try:
|
||||||
f = open('/proc/version', 'r')
|
f = open('/proc/version', 'r')
|
||||||
@@ -695,6 +748,7 @@ def getKernelVersionString():
|
|||||||
except:
|
except:
|
||||||
return _('unknown')
|
return _('unknown')
|
||||||
|
|
||||||
|
|
||||||
def getHardwareTypeString():
|
def getHardwareTypeString():
|
||||||
try:
|
try:
|
||||||
if os.path.isfile('/proc/stb/info/boxtype'):
|
if os.path.isfile('/proc/stb/info/boxtype'):
|
||||||
@@ -708,6 +762,7 @@ def getHardwareTypeString():
|
|||||||
|
|
||||||
return _('unavailable')
|
return _('unavailable')
|
||||||
|
|
||||||
|
|
||||||
def getImageTypeString():
|
def getImageTypeString():
|
||||||
try:
|
try:
|
||||||
return open('/etc/issue').readlines()[-2].capitalize().strip()[:-6]
|
return open('/etc/issue').readlines()[-2].capitalize().strip()[:-6]
|
||||||
@@ -716,12 +771,14 @@ def getImageTypeString():
|
|||||||
|
|
||||||
return _('undefined')
|
return _('undefined')
|
||||||
|
|
||||||
|
|
||||||
def getMachineBuild():
|
def getMachineBuild():
|
||||||
try:
|
try:
|
||||||
return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0]
|
return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0]
|
||||||
except:
|
except:
|
||||||
return 'unknown'
|
return 'unknown'
|
||||||
|
|
||||||
|
|
||||||
def getVuBoxModel():
|
def getVuBoxModel():
|
||||||
if fileExists('/proc/stb/info/vumodel'):
|
if fileExists('/proc/stb/info/vumodel'):
|
||||||
try:
|
try:
|
||||||
@@ -822,6 +879,7 @@ def getMountPointAll():
|
|||||||
os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/mmc\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh')
|
os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/mmc\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh')
|
||||||
os.system('echo "\n\nexit 0" >> ' + LinkNeoBoot + '/files/mountpoint.sh')
|
os.system('echo "\n\nexit 0" >> ' + LinkNeoBoot + '/files/mountpoint.sh')
|
||||||
|
|
||||||
|
|
||||||
def getMountPointNeo():
|
def getMountPointNeo():
|
||||||
os.system('' + LinkNeoBoot + '/files/mountpoint.sh')
|
os.system('' + LinkNeoBoot + '/files/mountpoint.sh')
|
||||||
os.system('echo ' + getLocationMultiboot() + ' > ' + LinkNeoBoot + '/bin/install; chmod 0755 ' + LinkNeoBoot + '/bin/install')
|
os.system('echo ' + getLocationMultiboot() + ' > ' + LinkNeoBoot + '/bin/install; chmod 0755 ' + LinkNeoBoot + '/bin/install')
|
||||||
@@ -859,6 +917,7 @@ def getMountPointNeo():
|
|||||||
out.close()
|
out.close()
|
||||||
os.system('chmod 755 ' + LinkNeoBoot + '/files/neo.sh')
|
os.system('chmod 755 ' + LinkNeoBoot + '/files/neo.sh')
|
||||||
|
|
||||||
|
|
||||||
def getMountPointNeo2():
|
def getMountPointNeo2():
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
os.system('touch ' + LinkNeoBoot + '/files/mountpoint.sh; echo "#!/bin/sh" > ' + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh')
|
os.system('touch ' + LinkNeoBoot + '/files/mountpoint.sh; echo "#!/bin/sh" > ' + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh')
|
||||||
|
|||||||
@@ -51,18 +51,22 @@ neoboot = getNeoLocation()
|
|||||||
media = getNeoLocation()
|
media = getNeoLocation()
|
||||||
mediahome = media + '/ImageBoot/'
|
mediahome = media + '/ImageBoot/'
|
||||||
|
|
||||||
|
|
||||||
def getDS():
|
def getDS():
|
||||||
s = getDesktop(0).size()
|
s = getDesktop(0).size()
|
||||||
return (s.width(), s.height())
|
return (s.width(), s.height())
|
||||||
|
|
||||||
|
|
||||||
def isFHD():
|
def isFHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] == 1920
|
return desktopSize[0] == 1920
|
||||||
|
|
||||||
|
|
||||||
def isHD():
|
def isHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] >= 1280 and desktopSize[0] < 1920
|
return desktopSize[0] >= 1280 and desktopSize[0] < 1920
|
||||||
|
|
||||||
|
|
||||||
def isUHD():
|
def isUHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] >= 1920 and desktopSize[0] < 3840
|
return desktopSize[0] >= 1920 and desktopSize[0] < 3840
|
||||||
@@ -74,6 +78,7 @@ def getKernelVersion():
|
|||||||
except:
|
except:
|
||||||
return _('unknown')
|
return _('unknown')
|
||||||
|
|
||||||
|
|
||||||
def getCPUtype():
|
def getCPUtype():
|
||||||
cpu = 'UNKNOWN'
|
cpu = 'UNKNOWN'
|
||||||
if os.path.exists('/proc/cpuinfo'):
|
if os.path.exists('/proc/cpuinfo'):
|
||||||
@@ -86,6 +91,7 @@ def getCPUtype():
|
|||||||
cpu = 'MIPS'
|
cpu = 'MIPS'
|
||||||
return cpu
|
return cpu
|
||||||
|
|
||||||
|
|
||||||
if os.path.exists('/etc/hostname'):
|
if os.path.exists('/etc/hostname'):
|
||||||
with open('/etc/hostname', 'r') as f:
|
with open('/etc/hostname', 'r') as f:
|
||||||
myboxname = f.readline().strip()
|
myboxname = f.readline().strip()
|
||||||
@@ -101,6 +107,7 @@ if os.path.exists('/proc/stb/info/boxtype'):
|
|||||||
boxtype = f.readline().strip()
|
boxtype = f.readline().strip()
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
class BoundFunction:
|
class BoundFunction:
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
@@ -230,7 +237,6 @@ class MBTools(Screen):
|
|||||||
self.list.append(res)
|
self.list.append(res)
|
||||||
self['list']. list = self.list
|
self['list']. list = self.list
|
||||||
|
|
||||||
|
|
||||||
def KeyOk(self):
|
def KeyOk(self):
|
||||||
self.sel = self['list'].getCurrent()
|
self.sel = self['list'].getCurrent()
|
||||||
if self.sel:
|
if self.sel:
|
||||||
@@ -420,11 +426,11 @@ class MBBackup(Screen):
|
|||||||
else:
|
else:
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
def myClose(self, message):
|
def myClose(self, message):
|
||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
class MBRestore(Screen):
|
class MBRestore(Screen):
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
skin = """ <screen name="ReinstllNeoBoot2" title="Reinstll NeoBoot" position="center,center" size="850,626">
|
skin = """ <screen name="ReinstllNeoBoot2" title="Reinstll NeoBoot" position="center,center" size="850,626">
|
||||||
@@ -574,6 +580,7 @@ class MBRestore(Screen):
|
|||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
class MenagerDevices(Screen):
|
class MenagerDevices(Screen):
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
skin = """<screen name="MenagerDevices" title="Device manager" position="center,center" size="700,300" flags="wfNoBorder">
|
skin = """<screen name="MenagerDevices" title="Device manager" position="center,center" size="700,300" flags="wfNoBorder">
|
||||||
@@ -858,6 +865,7 @@ class UpdateNeoBoot(Screen):
|
|||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
class MyUpgrade2(Screen):
|
class MyUpgrade2(Screen):
|
||||||
if isFHD():
|
if isFHD():
|
||||||
skin = """<screen name="MyUpgrade2" position="30,30" size="900,150" flags="wfNoBorder" title="NeoBoot">
|
skin = """<screen name="MyUpgrade2" position="30,30" size="900,150" flags="wfNoBorder" title="NeoBoot">
|
||||||
@@ -1025,6 +1033,7 @@ class IPTVPlayer(Screen):
|
|||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
class IPTVPlayer2(Screen):
|
class IPTVPlayer2(Screen):
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
@@ -1101,6 +1110,7 @@ class FeedExtra(Screen):
|
|||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
class FeedExtra2(Screen):
|
class FeedExtra2(Screen):
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
@@ -1248,6 +1258,7 @@ class CheckInstall(Screen):
|
|||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
class SkinChange(Screen):
|
class SkinChange(Screen):
|
||||||
if isFHD():
|
if isFHD():
|
||||||
skin = """ <screen name="SkinChange" position="center,center" size="850,746" title="NeoBoot Skin Change">
|
skin = """ <screen name="SkinChange" position="center,center" size="850,746" title="NeoBoot Skin Change">
|
||||||
@@ -1292,7 +1303,6 @@ class SkinChange(Screen):
|
|||||||
|
|
||||||
self['list'].list = skinlist
|
self['list'].list = skinlist
|
||||||
|
|
||||||
|
|
||||||
def SkinGO(self):
|
def SkinGO(self):
|
||||||
skin = self['list'].getCurrent()
|
skin = self['list'].getCurrent()
|
||||||
if skin:
|
if skin:
|
||||||
@@ -1379,7 +1389,6 @@ class SkinChange(Screen):
|
|||||||
restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('GUI needs a restart.\nDo you want to Restart the GUI now?'), MessageBox.TYPE_YESNO)
|
restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('GUI needs a restart.\nDo you want to Restart the GUI now?'), MessageBox.TYPE_YESNO)
|
||||||
restartbox.setTitle(_('Restart GUI now?'))
|
restartbox.setTitle(_('Restart GUI now?'))
|
||||||
|
|
||||||
|
|
||||||
def restartGUI(self, answer):
|
def restartGUI(self, answer):
|
||||||
if answer is True:
|
if answer is True:
|
||||||
self.session.open(TryQuitMainloop, 3)
|
self.session.open(TryQuitMainloop, 3)
|
||||||
@@ -1455,7 +1464,6 @@ class BlocUnblockImageSkin(Screen):
|
|||||||
temp_file2.write(content.replace('neoBootImageChoose', 'NeoBootImageChoose'))
|
temp_file2.write(content.replace('neoBootImageChoose', 'NeoBootImageChoose'))
|
||||||
temp_file2.close()
|
temp_file2.close()
|
||||||
|
|
||||||
|
|
||||||
def restareE2(self):
|
def restareE2(self):
|
||||||
restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('GUI needs a restart.\nDo you want to Restart the GUI now?'), MessageBox.TYPE_YESNO)
|
restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('GUI needs a restart.\nDo you want to Restart the GUI now?'), MessageBox.TYPE_YESNO)
|
||||||
restartbox.setTitle(_('Restart GUI now?'))
|
restartbox.setTitle(_('Restart GUI now?'))
|
||||||
@@ -1563,7 +1571,6 @@ class InternalFlash(Screen):
|
|||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DeletingLanguages(Screen):
|
class DeletingLanguages(Screen):
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
skin = """ <screen name="DeletingLanguages" title="Deleting Languages" position="center,center" size="850,647">
|
skin = """ <screen name="DeletingLanguages" title="Deleting Languages" position="center,center" size="850,647">
|
||||||
@@ -1670,6 +1677,7 @@ class TunerInfo(Screen):
|
|||||||
except:
|
except:
|
||||||
False
|
False
|
||||||
|
|
||||||
|
|
||||||
class CreateSwap(Screen):
|
class CreateSwap(Screen):
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
skin = """<screen name="TunerInfo" title="NeoBoot - Create Swap " position="center,center" size="700,300" flags="wfNoBorder">
|
skin = """<screen name="TunerInfo" title="NeoBoot - Create Swap " position="center,center" size="700,300" flags="wfNoBorder">
|
||||||
@@ -1733,6 +1741,7 @@ class CreateSwap(Screen):
|
|||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
class MultiBootMyHelp(Screen):
|
class MultiBootMyHelp(Screen):
|
||||||
if isFHD():
|
if isFHD():
|
||||||
skin = """<screen name="MultiBootMyHelp" position="center,center" size="1920,1080" title="NeoBoot - Opis" flags="wfNoBorder">
|
skin = """<screen name="MultiBootMyHelp" position="center,center" size="1920,1080" title="NeoBoot - Opis" flags="wfNoBorder">
|
||||||
@@ -1839,6 +1848,7 @@ class Opis(Screen):
|
|||||||
<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/scroll.png" position="754,100" size="26,455" zPosition="5" alphatest="blend" backgroundColor="black" transparent="1" />
|
<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/scroll.png" position="754,100" size="26,455" zPosition="5" alphatest="blend" backgroundColor="black" transparent="1" />
|
||||||
</screen>"""
|
</screen>"""
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self['key_red'] = Label(_('Remove NeoBoot of STB'))
|
self['key_red'] = Label(_('Remove NeoBoot of STB'))
|
||||||
@@ -1855,7 +1865,6 @@ class Opis(Screen):
|
|||||||
self['lab1'].hide()
|
self['lab1'].hide()
|
||||||
self.updatetext()
|
self.updatetext()
|
||||||
|
|
||||||
|
|
||||||
def updatetext(self):
|
def updatetext(self):
|
||||||
message = _('\\ NeoBoot Ver. ' + PLUGINVERSION + ' - NeoBoot Ver. updates ' + UPDATEVERSION + '//\n\n')
|
message = _('\\ NeoBoot Ver. ' + PLUGINVERSION + ' - NeoBoot Ver. updates ' + UPDATEVERSION + '//\n\n')
|
||||||
message += _('\----------NEOBOOT - VIP FULL VERSION----------/\n')
|
message += _('\----------NEOBOOT - VIP FULL VERSION----------/\n')
|
||||||
@@ -1945,6 +1954,7 @@ class Opis(Screen):
|
|||||||
else:
|
else:
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
class ReinstallKernel(Screen):
|
class ReinstallKernel(Screen):
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
@@ -2036,6 +2046,7 @@ class neoDONATION(Screen):
|
|||||||
def myboot(session, **kwargs):
|
def myboot(session, **kwargs):
|
||||||
session.open(MBTools)
|
session.open(MBTools)
|
||||||
|
|
||||||
|
|
||||||
def Plugins(path, **kwargs):
|
def Plugins(path, **kwargs):
|
||||||
global pluginpath
|
global pluginpath
|
||||||
pluginpath = path
|
pluginpath = path
|
||||||
|
|||||||
@@ -121,6 +121,5 @@ ImageChooseFULLHD = """
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###ImageChoose-HD
|
###ImageChoose-HD
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ from Components.Pixmap import Pixmap
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###____ Skin HD - ImageChoose ___mod. gutosie ___
|
###____ Skin HD - ImageChoose ___mod. gutosie ___
|
||||||
ImageChooseHD = """
|
ImageChooseHD = """
|
||||||
<screen name="NeoBootImageChoose" position="center,center" size="1280, 720" backgroundColor="transpBlack">
|
<screen name="NeoBootImageChoose" position="center,center" size="1280, 720" backgroundColor="transpBlack">
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ try:
|
|||||||
except:
|
except:
|
||||||
print("ERROR INSERTING FONT")
|
print("ERROR INSERTING FONT")
|
||||||
|
|
||||||
|
|
||||||
def neoTranslator():
|
def neoTranslator():
|
||||||
neolang = ''
|
neolang = ''
|
||||||
usedlang = open('/etc/enigma2/settings', 'r')
|
usedlang = open('/etc/enigma2/settings', 'r')
|
||||||
@@ -82,22 +83,27 @@ def neoTranslator():
|
|||||||
neolang = 'isnotlangPL'
|
neolang = 'isnotlangPL'
|
||||||
return neolang
|
return neolang
|
||||||
|
|
||||||
|
|
||||||
def getDS():
|
def getDS():
|
||||||
s = getDesktop(0).size()
|
s = getDesktop(0).size()
|
||||||
return (s.width(), s.height())
|
return (s.width(), s.height())
|
||||||
|
|
||||||
|
|
||||||
def isFHD():
|
def isFHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] == 1920
|
return desktopSize[0] == 1920
|
||||||
|
|
||||||
|
|
||||||
def isHD():
|
def isHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] >= 1280 and desktopSize[0] < 1920
|
return desktopSize[0] >= 1280 and desktopSize[0] < 1920
|
||||||
|
|
||||||
|
|
||||||
def isUHD():
|
def isUHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] >= 1920 and desktopSize[0] < 3840
|
return desktopSize[0] >= 1920 and desktopSize[0] < 3840
|
||||||
|
|
||||||
|
|
||||||
class MyUpgrade(Screen):
|
class MyUpgrade(Screen):
|
||||||
if isFHD():
|
if isFHD():
|
||||||
from Plugins.Extensions.NeoBoot.neoskins.default import MyUpgradeFULLHD
|
from Plugins.Extensions.NeoBoot.neoskins.default import MyUpgradeFULLHD
|
||||||
@@ -645,11 +651,9 @@ class NeoBootInstallation(Screen):
|
|||||||
self.session.open(Console, _('NeoBoot Install....'), [cmd])
|
self.session.open(Console, _('NeoBoot Install....'), [cmd])
|
||||||
self.close(closereboot)
|
self.close(closereboot)
|
||||||
|
|
||||||
|
|
||||||
def myclose2(self, message):
|
def myclose2(self, message):
|
||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
|
|
||||||
|
|
||||||
def rebootSTBE2(self):
|
def rebootSTBE2(self):
|
||||||
restartbox = self.session.openWithCallback(self.RebootSTB, MessageBox, _('Reboot stb now ?'), MessageBox.TYPE_YESNO)
|
restartbox = self.session.openWithCallback(self.RebootSTB, MessageBox, _('Reboot stb now ?'), MessageBox.TYPE_YESNO)
|
||||||
restartbox.setTitle(_('Reboot'))
|
restartbox.setTitle(_('Reboot'))
|
||||||
@@ -759,7 +763,6 @@ class NeoBootImageChoose(Screen):
|
|||||||
if not fileExists('/.control_boot_new_image'):
|
if not fileExists('/.control_boot_new_image'):
|
||||||
os.system('echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok')
|
os.system('echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok')
|
||||||
|
|
||||||
|
|
||||||
def DownloadImageOnline(self):
|
def DownloadImageOnline(self):
|
||||||
if not os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/ImageDownloader/download.py'):
|
if not os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/ImageDownloader/download.py'):
|
||||||
message = _('Plugin ImageDownloader not installed!\nInstall plugin to download new image? \and---Continue ?---')
|
message = _('Plugin ImageDownloader not installed!\nInstall plugin to download new image? \and---Continue ?---')
|
||||||
@@ -808,6 +811,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
message = _('NeoBoot detected a kernel mismatch in flash, \nInstall a kernel for flash image??')
|
message = _('NeoBoot detected a kernel mismatch in flash, \nInstall a kernel for flash image??')
|
||||||
ybox = self.session.openWithCallback(self.updatekernel, MessageBox, message, MessageBox.TYPE_YESNO)
|
ybox = self.session.openWithCallback(self.updatekernel, MessageBox, message, MessageBox.TYPE_YESNO)
|
||||||
ybox.setTitle(_('Updating ... '))
|
ybox.setTitle(_('Updating ... '))
|
||||||
|
|
||||||
def pomoc(self):
|
def pomoc(self):
|
||||||
try:
|
try:
|
||||||
from Plugins.Extensions.NeoBoot.files.tools import Opis
|
from Plugins.Extensions.NeoBoot.files.tools import Opis
|
||||||
@@ -896,6 +900,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
system('touch /tmp/guto')
|
system('touch /tmp/guto')
|
||||||
else:
|
else:
|
||||||
system('touch /tmp/guto')
|
system('touch /tmp/guto')
|
||||||
|
|
||||||
def touch4(self):
|
def touch4(self):
|
||||||
if fileExists('/usr/lib/periodon/.kodn'):
|
if fileExists('/usr/lib/periodon/.kodn'):
|
||||||
pass
|
pass
|
||||||
@@ -904,6 +909,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
system('touch /tmp/gutos')
|
system('touch /tmp/gutos')
|
||||||
|
|
||||||
def touch7(self):
|
def touch7(self):
|
||||||
if fileExists('/usr/lib/periodon/.kodn'):
|
if fileExists('/usr/lib/periodon/.kodn'):
|
||||||
pass
|
pass
|
||||||
@@ -912,6 +918,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
system('touch /tmp/gutosi')
|
system('touch /tmp/gutosi')
|
||||||
|
|
||||||
def touch6(self):
|
def touch6(self):
|
||||||
if fileExists('/usr/lib/periodon/.kodn'):
|
if fileExists('/usr/lib/periodon/.kodn'):
|
||||||
pass
|
pass
|
||||||
@@ -933,6 +940,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
elif not fileExists('/usr/lib/periodon/.kodn'):
|
elif not fileExists('/usr/lib/periodon/.kodn'):
|
||||||
mess = _('VIP Access Activation Fails with Error code 0x20.')
|
mess = _('VIP Access Activation Fails with Error code 0x20.')
|
||||||
self.session.open(MessageBox, mess, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, mess, MessageBox.TYPE_INFO)
|
||||||
|
|
||||||
def touch9(self):
|
def touch9(self):
|
||||||
if fileExists('/usr/lib/periodon/.kodn'):
|
if fileExists('/usr/lib/periodon/.kodn'):
|
||||||
system('touch /tmp/gut1')
|
system('touch /tmp/gut1')
|
||||||
@@ -941,6 +949,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
system('touch /tmp/gutosiep')
|
system('touch /tmp/gutosiep')
|
||||||
|
|
||||||
def touch8(self):
|
def touch8(self):
|
||||||
if fileExists('/usr/lib/periodon/.kodn'):
|
if fileExists('/usr/lib/periodon/.kodn'):
|
||||||
system('touch /tmp/gut2')
|
system('touch /tmp/gut2')
|
||||||
@@ -949,6 +958,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
system('touch /tmp/gutosiepi')
|
system('touch /tmp/gutosiepi')
|
||||||
|
|
||||||
def touch0(self):
|
def touch0(self):
|
||||||
if fileExists('/usr/lib/periodon/.kodn'):
|
if fileExists('/usr/lib/periodon/.kodn'):
|
||||||
if not fileExists('/tmp/gut3'):
|
if not fileExists('/tmp/gut3'):
|
||||||
@@ -971,6 +981,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
# self.session.open(MessageBox, mess, MessageBox.TYPE_INFO)
|
# self.session.open(MessageBox, mess, MessageBox.TYPE_INFO)
|
||||||
|
|
||||||
#Zablokowanie aktualizacji przez zmiane nazwy neoboot_update na neoboot_update2 i likwidacja 3 lini hastagu wyzej
|
#Zablokowanie aktualizacji przez zmiane nazwy neoboot_update na neoboot_update2 i likwidacja 3 lini hastagu wyzej
|
||||||
|
|
||||||
def neoboot_update(self):
|
def neoboot_update(self):
|
||||||
if checkInternet():
|
if checkInternet():
|
||||||
#if getTestInTime() == getTestOutTime() or getTestIn() != getTestOut():
|
#if getTestInTime() == getTestOutTime() or getTestIn() != getTestOut():
|
||||||
@@ -1064,7 +1075,6 @@ class NeoBootImageChoose(Screen):
|
|||||||
restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('Completed update NeoBoot.\nYou need to restart the E2 and re-enter your pin code VIP!!!\nRestart now ?'), MessageBox.TYPE_YESNO)
|
restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('Completed update NeoBoot.\nYou need to restart the E2 and re-enter your pin code VIP!!!\nRestart now ?'), MessageBox.TYPE_YESNO)
|
||||||
restartbox.setTitle(_('Restart GUI now ?'))
|
restartbox.setTitle(_('Restart GUI now ?'))
|
||||||
|
|
||||||
|
|
||||||
def restartGUI(self, answer):
|
def restartGUI(self, answer):
|
||||||
if answer is True:
|
if answer is True:
|
||||||
os.system('rm -f ' + LinkNeoBoot + '/.location; rm -r ' + LinkNeoBoot + '/ubi_reader')
|
os.system('rm -f ' + LinkNeoBoot + '/.location; rm -r ' + LinkNeoBoot + '/ubi_reader')
|
||||||
@@ -1081,6 +1091,7 @@ class NeoBootImageChoose(Screen):
|
|||||||
LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e)))
|
LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e)))
|
||||||
mess = _('Sorry cannot open neo menu Backup.\nAccess Fails with Error code 0x60.')
|
mess = _('Sorry cannot open neo menu Backup.\nAccess Fails with Error code 0x60.')
|
||||||
self.session.open(MessageBox, mess, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, mess, MessageBox.TYPE_INFO)
|
||||||
|
|
||||||
def MBRestore(self):
|
def MBRestore(self):
|
||||||
try:
|
try:
|
||||||
from Plugins.Extensions.NeoBoot.files.tools import MBRestore
|
from Plugins.Extensions.NeoBoot.files.tools import MBRestore
|
||||||
@@ -1311,7 +1322,6 @@ class NeoBootImageChoose(Screen):
|
|||||||
else:
|
else:
|
||||||
self.session.open(MessageBox, _('Removing canceled!'), MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, _('Removing canceled!'), MessageBox.TYPE_INFO)
|
||||||
|
|
||||||
|
|
||||||
def ImageInstall(self):
|
def ImageInstall(self):
|
||||||
if not fileExists('/.multinfo'):
|
if not fileExists('/.multinfo'):
|
||||||
if getAccessN() != '1234': #%s' % UPDATEVERSION
|
if getAccessN() != '1234': #%s' % UPDATEVERSION
|
||||||
@@ -1528,6 +1538,7 @@ def readline(filename, iferror=''):
|
|||||||
PrintException()
|
PrintException()
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
def checkInternet():
|
def checkInternet():
|
||||||
if fileExists('/usr/lib/python3.8'):
|
if fileExists('/usr/lib/python3.8'):
|
||||||
return True
|
return True
|
||||||
@@ -1544,6 +1555,7 @@ def checkInternet():
|
|||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def checkimage():
|
def checkimage():
|
||||||
mycheck = False
|
mycheck = False
|
||||||
if not fileExists('/proc/stb/info') or not fileExists('' + LinkNeoBoot + '/neoskins/neo/neo_skin.py') or not fileExists('' + LinkNeoBoot + '/bin/utilsbh') or not fileExists('' + LinkNeoBoot + '/stbinfo.cfg'):
|
if not fileExists('/proc/stb/info') or not fileExists('' + LinkNeoBoot + '/neoskins/neo/neo_skin.py') or not fileExists('' + LinkNeoBoot + '/bin/utilsbh') or not fileExists('' + LinkNeoBoot + '/stbinfo.cfg'):
|
||||||
@@ -1552,6 +1564,7 @@ def checkimage():
|
|||||||
mycheck = True
|
mycheck = True
|
||||||
return mycheck
|
return mycheck
|
||||||
|
|
||||||
|
|
||||||
def main(session, **kwargs):
|
def main(session, **kwargs):
|
||||||
vip = checkimage()
|
vip = checkimage()
|
||||||
if vip == 1:
|
if vip == 1:
|
||||||
@@ -1636,6 +1649,7 @@ def main(session, **kwargs):
|
|||||||
else:
|
else:
|
||||||
session.open(MessageBox, (_('Sorry, Unable to install, bad satellite receiver or you do not have the full plug-in version\n\nThe full version of the NEO VIP plugin is on address:\nkrzysztofgutosie@.gmail.com')), type=MessageBox.TYPE_ERROR)
|
session.open(MessageBox, (_('Sorry, Unable to install, bad satellite receiver or you do not have the full plug-in version\n\nThe full version of the NEO VIP plugin is on address:\nkrzysztofgutosie@.gmail.com')), type=MessageBox.TYPE_ERROR)
|
||||||
|
|
||||||
|
|
||||||
def menu(menuid, **kwargs):
|
def menu(menuid, **kwargs):
|
||||||
if menuid == 'mainmenu':
|
if menuid == 'mainmenu':
|
||||||
return [(_('NeoBOOT'),
|
return [(_('NeoBOOT'),
|
||||||
@@ -1644,8 +1658,10 @@ def menu(menuid, **kwargs):
|
|||||||
1)]
|
1)]
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
from Plugins.Plugin import PluginDescriptor
|
from Plugins.Plugin import PluginDescriptor
|
||||||
|
|
||||||
|
|
||||||
def Plugins(**kwargs):
|
def Plugins(**kwargs):
|
||||||
if isFHD():
|
if isFHD():
|
||||||
list = [PluginDescriptor(name='NeoBoot', description='NeoBoot', where=PluginDescriptor.WHERE_MENU, fnc=menu), PluginDescriptor(name='NeoBoot', description=_('Installing multiple images'), icon='neo_fhd.png', where=PluginDescriptor.WHERE_PLUGINMENU, fnc=main)]
|
list = [PluginDescriptor(name='NeoBoot', description='NeoBoot', where=PluginDescriptor.WHERE_MENU, fnc=menu), PluginDescriptor(name='NeoBoot', description=_('Installing multiple images'), icon='neo_fhd.png', where=PluginDescriptor.WHERE_PLUGINMENU, fnc=main)]
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import os
|
|||||||
import time
|
import time
|
||||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||||
|
|
||||||
|
|
||||||
class StartImage(Screen):
|
class StartImage(Screen):
|
||||||
screenwidth = getDesktop(0).size().width()
|
screenwidth = getDesktop(0).size().width()
|
||||||
if screenwidth and screenwidth == 1920:
|
if screenwidth and screenwidth == 1920:
|
||||||
@@ -62,6 +63,7 @@ class StartImage(Screen):
|
|||||||
\n\t\t </screen>"""
|
\n\t\t </screen>"""
|
||||||
|
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self.list = []
|
self.list = []
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ class StartImage(Screen):
|
|||||||
\n\t\t </screen>"""
|
\n\t\t </screen>"""
|
||||||
|
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self.list = []
|
self.list = []
|
||||||
@@ -105,7 +106,6 @@ class StartImage(Screen):
|
|||||||
if getBoxVuModel() == 'duo4k':
|
if getBoxVuModel() == 'duo4k':
|
||||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
|
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
|
||||||
|
|
||||||
|
|
||||||
system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh')
|
system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh')
|
||||||
self.sel = self['list'].getCurrent()
|
self.sel = self['list'].getCurrent()
|
||||||
if self.sel:
|
if self.sel:
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ class StartImage(Screen):
|
|||||||
\n\t\t </screen>"""
|
\n\t\t </screen>"""
|
||||||
|
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self.list = []
|
self.list = []
|
||||||
@@ -105,7 +106,6 @@ class StartImage(Screen):
|
|||||||
if getBoxVuModel() == 'duo4kse':
|
if getBoxVuModel() == 'duo4kse':
|
||||||
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
|
os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
|
||||||
|
|
||||||
|
|
||||||
system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh')
|
system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh')
|
||||||
self.sel = self['list'].getCurrent()
|
self.sel = self['list'].getCurrent()
|
||||||
if self.sel:
|
if self.sel:
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class StartImage(Screen):
|
|||||||
\n\t\t </screen>"""
|
\n\t\t </screen>"""
|
||||||
|
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self.list = []
|
self.list = []
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import os
|
|||||||
import time
|
import time
|
||||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||||
|
|
||||||
|
|
||||||
class StartImage(Screen):
|
class StartImage(Screen):
|
||||||
screenwidth = getDesktop(0).size().width()
|
screenwidth = getDesktop(0).size().width()
|
||||||
if screenwidth and screenwidth == 1920:
|
if screenwidth and screenwidth == 1920:
|
||||||
@@ -63,6 +64,7 @@ class StartImage(Screen):
|
|||||||
\n\t\t </screen>"""
|
\n\t\t </screen>"""
|
||||||
|
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self.list = []
|
self.list = []
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class StartImage(Screen):
|
|||||||
\n\t\t </screen>"""
|
\n\t\t </screen>"""
|
||||||
|
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self.list = []
|
self.list = []
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class StartImage(Screen):
|
|||||||
\n\t\t </screen>"""
|
\n\t\t </screen>"""
|
||||||
|
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self.list = []
|
self.list = []
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class StartImage(Screen):
|
|||||||
\n\t\t </screen>"""
|
\n\t\t </screen>"""
|
||||||
|
|
||||||
__module__ = __name__
|
__module__ = __name__
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
Screen.__init__(self, session)
|
Screen.__init__(self, session)
|
||||||
self.list = []
|
self.list = []
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import sys as _sys
|
|||||||
import textwrap as _textwrap
|
import textwrap as _textwrap
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
|
||||||
def _callable(obj):
|
def _callable(obj):
|
||||||
return hasattr(obj, '__call__') or hasattr(obj, '__bases__')
|
return hasattr(obj, '__call__') or hasattr(obj, '__bases__')
|
||||||
|
|
||||||
@@ -36,6 +37,7 @@ PARSER = 'A...'
|
|||||||
REMAINDER = '...'
|
REMAINDER = '...'
|
||||||
_UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'
|
_UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'
|
||||||
|
|
||||||
|
|
||||||
class _AttributeHolder(object):
|
class _AttributeHolder(object):
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from ubi import display
|
|||||||
from ubi.image import description as image
|
from ubi.image import description as image
|
||||||
from ubi.block import layout
|
from ubi.block import layout
|
||||||
|
|
||||||
|
|
||||||
class ubi:
|
class ubi:
|
||||||
|
|
||||||
def __init__(self, ubi_file):
|
def __init__(self, ubi_file):
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from ubi import display
|
|||||||
from ubi.defines import *
|
from ubi.defines import *
|
||||||
from ubi.headers import *
|
from ubi.headers import *
|
||||||
|
|
||||||
|
|
||||||
class description(object):
|
class description(object):
|
||||||
|
|
||||||
def __init__(self, block_buf):
|
def __init__(self, block_buf):
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from ubi.block import sort
|
from ubi.block import sort
|
||||||
|
|
||||||
|
|
||||||
def group_pairs(blocks, layout_blocks_list):
|
def group_pairs(blocks, layout_blocks_list):
|
||||||
layouts_grouped = [[blocks[layout_blocks_list[0]].peb_num]]
|
layouts_grouped = [[blocks[layout_blocks_list[0]].peb_num]]
|
||||||
for l in layout_blocks_list[1:]:
|
for l in layout_blocks_list[1:]:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from ubi.defines import PRINT_COMPAT_LIST, PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
|
from ubi.defines import PRINT_COMPAT_LIST, PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
|
||||||
|
|
||||||
|
|
||||||
def ubi(ubi, tab=''):
|
def ubi(ubi, tab=''):
|
||||||
print '%sUBI File' % tab
|
print '%sUBI File' % tab
|
||||||
print '%s---------------------' % tab
|
print '%s---------------------' % tab
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import struct
|
|||||||
from ubi.defines import *
|
from ubi.defines import *
|
||||||
from ubi.headers import errors
|
from ubi.headers import errors
|
||||||
|
|
||||||
|
|
||||||
class ec_hdr(object):
|
class ec_hdr(object):
|
||||||
|
|
||||||
def __init__(self, buf):
|
def __init__(self, buf):
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
from zlib import crc32
|
from zlib import crc32
|
||||||
from ubi.defines import *
|
from ubi.defines import *
|
||||||
|
|
||||||
|
|
||||||
def ec_hdr(ec_hdr, buf):
|
def ec_hdr(ec_hdr, buf):
|
||||||
if ec_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295L:
|
if ec_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295L:
|
||||||
ec_hdr.errors.append('crc')
|
ec_hdr.errors.append('crc')
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ from ubi import display
|
|||||||
from ubi.volume import get_volumes
|
from ubi.volume import get_volumes
|
||||||
from ubi.block import get_blocks_in_list
|
from ubi.block import get_blocks_in_list
|
||||||
|
|
||||||
|
|
||||||
class description(object):
|
class description(object):
|
||||||
|
|
||||||
def __init__(self, blocks, layout_info):
|
def __init__(self, blocks, layout_info):
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
from ubi import display
|
from ubi import display
|
||||||
from ubi.block import sort, get_blocks_in_list
|
from ubi.block import sort, get_blocks_in_list
|
||||||
|
|
||||||
|
|
||||||
class description(object):
|
class description(object):
|
||||||
|
|
||||||
def __init__(self, vol_id, vol_rec, block_list):
|
def __init__(self, vol_id, vol_rec, block_list):
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from ubi.block import sort
|
from ubi.block import sort
|
||||||
|
|
||||||
|
|
||||||
class ubi_file(object):
|
class ubi_file(object):
|
||||||
|
|
||||||
def __init__(self, path, block_size, start_offset=0, end_offset=None):
|
def __init__(self, path, block_size, start_offset=0, end_offset=None):
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from ubifs import nodes
|
|||||||
from ubifs.nodes import extract
|
from ubifs.nodes import extract
|
||||||
from ubifs.log import log
|
from ubifs.log import log
|
||||||
|
|
||||||
|
|
||||||
class ubifs:
|
class ubifs:
|
||||||
|
|
||||||
def __init__(self, ubifs_file):
|
def __init__(self, ubifs_file):
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import ui
|
import ui
|
||||||
|
|
||||||
|
|
||||||
class log:
|
class log:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ key_types = ['ino',
|
|||||||
'dent',
|
'dent',
|
||||||
'xent']
|
'xent']
|
||||||
|
|
||||||
|
|
||||||
def parse_key(key):
|
def parse_key(key):
|
||||||
hkey, lkey = struct.unpack('<II', key[0:UBIFS_SK_LEN])
|
hkey, lkey = struct.unpack('<II', key[0:UBIFS_SK_LEN])
|
||||||
ino_num = hkey & UBIFS_S_KEY_HASH_MASK
|
ino_num = hkey & UBIFS_S_KEY_HASH_MASK
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import struct
|
|||||||
from ubifs.defines import *
|
from ubifs.defines import *
|
||||||
from ubifs.misc import parse_key
|
from ubifs.misc import parse_key
|
||||||
|
|
||||||
|
|
||||||
class common_hdr(object):
|
class common_hdr(object):
|
||||||
|
|
||||||
def __init__(self, buf):
|
def __init__(self, buf):
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
from ubifs import nodes
|
from ubifs import nodes
|
||||||
from ubifs.defines import *
|
from ubifs.defines import *
|
||||||
|
|
||||||
|
|
||||||
def common_hdr(ubifs, lnum, offset=0):
|
def common_hdr(ubifs, lnum, offset=0):
|
||||||
ubifs.file.seek(ubifs.leb_size * lnum + offset)
|
ubifs.file.seek(ubifs.leb_size * lnum + offset)
|
||||||
return nodes.common_hdr(ubifs.file.read(UBIFS_COMMON_HDR_SZ))
|
return nodes.common_hdr(ubifs.file.read(UBIFS_COMMON_HDR_SZ))
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import struct
|
|||||||
from ubifs.defines import *
|
from ubifs.defines import *
|
||||||
from ubifs.misc import decompress
|
from ubifs.misc import decompress
|
||||||
|
|
||||||
|
|
||||||
def dents(ubifs, inodes, dent_node, path='', perms=False):
|
def dents(ubifs, inodes, dent_node, path='', perms=False):
|
||||||
inode = inodes[dent_node.inum]
|
inode = inodes[dent_node.inum]
|
||||||
dent_path = os.path.join(path, dent_node.name)
|
dent_path = os.path.join(path, dent_node.name)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
from ubifs import extract
|
from ubifs import extract
|
||||||
from ubifs.defines import *
|
from ubifs.defines import *
|
||||||
|
|
||||||
|
|
||||||
def index(ubifs, lnum, offset, inodes={}):
|
def index(ubifs, lnum, offset, inodes={}):
|
||||||
chdr = extract.common_hdr(ubifs, lnum, offset)
|
chdr = extract.common_hdr(ubifs, lnum, offset)
|
||||||
if chdr.node_type == UBIFS_IDX_NODE:
|
if chdr.node_type == UBIFS_IDX_NODE:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from ubifs.defines import PRINT_UBIFS_KEY_HASH, PRINT_UBIFS_COMPR
|
|||||||
from ubi.defines import PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
|
from ubi.defines import PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
|
||||||
output_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'output')
|
output_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'output')
|
||||||
|
|
||||||
|
|
||||||
def extract_files(ubifs, out_path, perms=False):
|
def extract_files(ubifs, out_path, perms=False):
|
||||||
try:
|
try:
|
||||||
inodes = {}
|
inodes = {}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import sys as _sys
|
|||||||
import textwrap as _textwrap
|
import textwrap as _textwrap
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
|
||||||
def _callable(obj):
|
def _callable(obj):
|
||||||
return hasattr(obj, '__call__') or hasattr(obj, '__bases__')
|
return hasattr(obj, '__call__') or hasattr(obj, '__bases__')
|
||||||
|
|
||||||
@@ -36,6 +37,7 @@ PARSER = 'A...'
|
|||||||
REMAINDER = '...'
|
REMAINDER = '...'
|
||||||
_UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'
|
_UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'
|
||||||
|
|
||||||
|
|
||||||
class _AttributeHolder(object):
|
class _AttributeHolder(object):
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from ubi import display
|
|||||||
from ubi.image import description as image
|
from ubi.image import description as image
|
||||||
from ubi.block import layout
|
from ubi.block import layout
|
||||||
|
|
||||||
|
|
||||||
class ubi:
|
class ubi:
|
||||||
|
|
||||||
def __init__(self, ubi_file):
|
def __init__(self, ubi_file):
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from ubi import display
|
|||||||
from ubi.defines import *
|
from ubi.defines import *
|
||||||
from ubi.headers import *
|
from ubi.headers import *
|
||||||
|
|
||||||
|
|
||||||
class description(object):
|
class description(object):
|
||||||
|
|
||||||
def __init__(self, block_buf):
|
def __init__(self, block_buf):
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from ubi.block import sort
|
from ubi.block import sort
|
||||||
|
|
||||||
|
|
||||||
def group_pairs(blocks, layout_blocks_list):
|
def group_pairs(blocks, layout_blocks_list):
|
||||||
layouts_grouped = [[blocks[layout_blocks_list[0]].peb_num]]
|
layouts_grouped = [[blocks[layout_blocks_list[0]].peb_num]]
|
||||||
for l in layout_blocks_list[1:]:
|
for l in layout_blocks_list[1:]:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from ubi.defines import PRINT_COMPAT_LIST, PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
|
from ubi.defines import PRINT_COMPAT_LIST, PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
|
||||||
|
|
||||||
|
|
||||||
def ubi(ubi, tab=''):
|
def ubi(ubi, tab=''):
|
||||||
print '%sUBI File' % tab
|
print '%sUBI File' % tab
|
||||||
print '%s---------------------' % tab
|
print '%s---------------------' % tab
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import struct
|
|||||||
from ubi.defines import *
|
from ubi.defines import *
|
||||||
from ubi.headers import errors
|
from ubi.headers import errors
|
||||||
|
|
||||||
|
|
||||||
class ec_hdr(object):
|
class ec_hdr(object):
|
||||||
|
|
||||||
def __init__(self, buf):
|
def __init__(self, buf):
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
from zlib import crc32
|
from zlib import crc32
|
||||||
from ubi.defines import *
|
from ubi.defines import *
|
||||||
|
|
||||||
|
|
||||||
def ec_hdr(ec_hdr, buf):
|
def ec_hdr(ec_hdr, buf):
|
||||||
if ec_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295L:
|
if ec_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295L:
|
||||||
ec_hdr.errors.append('crc')
|
ec_hdr.errors.append('crc')
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ from ubi import display
|
|||||||
from ubi.volume import get_volumes
|
from ubi.volume import get_volumes
|
||||||
from ubi.block import get_blocks_in_list
|
from ubi.block import get_blocks_in_list
|
||||||
|
|
||||||
|
|
||||||
class description(object):
|
class description(object):
|
||||||
|
|
||||||
def __init__(self, blocks, layout_info):
|
def __init__(self, blocks, layout_info):
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
from ubi import display
|
from ubi import display
|
||||||
from ubi.block import sort, get_blocks_in_list
|
from ubi.block import sort, get_blocks_in_list
|
||||||
|
|
||||||
|
|
||||||
class description(object):
|
class description(object):
|
||||||
|
|
||||||
def __init__(self, vol_id, vol_rec, block_list):
|
def __init__(self, vol_id, vol_rec, block_list):
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from ubi.block import sort
|
from ubi.block import sort
|
||||||
|
|
||||||
|
|
||||||
class ubi_file(object):
|
class ubi_file(object):
|
||||||
|
|
||||||
def __init__(self, path, block_size, start_offset=0, end_offset=None):
|
def __init__(self, path, block_size, start_offset=0, end_offset=None):
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from ubifs import nodes
|
|||||||
from ubifs.nodes import extract
|
from ubifs.nodes import extract
|
||||||
from ubifs.log import log
|
from ubifs.log import log
|
||||||
|
|
||||||
|
|
||||||
class ubifs:
|
class ubifs:
|
||||||
|
|
||||||
def __init__(self, ubifs_file):
|
def __init__(self, ubifs_file):
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import ui
|
import ui
|
||||||
|
|
||||||
|
|
||||||
class log:
|
class log:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ key_types = ['ino',
|
|||||||
'dent',
|
'dent',
|
||||||
'xent']
|
'xent']
|
||||||
|
|
||||||
|
|
||||||
def parse_key(key):
|
def parse_key(key):
|
||||||
hkey, lkey = struct.unpack('<II', key[0:UBIFS_SK_LEN])
|
hkey, lkey = struct.unpack('<II', key[0:UBIFS_SK_LEN])
|
||||||
ino_num = hkey & UBIFS_S_KEY_HASH_MASK
|
ino_num = hkey & UBIFS_S_KEY_HASH_MASK
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import struct
|
|||||||
from ubifs.defines import *
|
from ubifs.defines import *
|
||||||
from ubifs.misc import parse_key
|
from ubifs.misc import parse_key
|
||||||
|
|
||||||
|
|
||||||
class common_hdr(object):
|
class common_hdr(object):
|
||||||
|
|
||||||
def __init__(self, buf):
|
def __init__(self, buf):
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
from ubifs import nodes
|
from ubifs import nodes
|
||||||
from ubifs.defines import *
|
from ubifs.defines import *
|
||||||
|
|
||||||
|
|
||||||
def common_hdr(ubifs, lnum, offset=0):
|
def common_hdr(ubifs, lnum, offset=0):
|
||||||
ubifs.file.seek(ubifs.leb_size * lnum + offset)
|
ubifs.file.seek(ubifs.leb_size * lnum + offset)
|
||||||
return nodes.common_hdr(ubifs.file.read(UBIFS_COMMON_HDR_SZ))
|
return nodes.common_hdr(ubifs.file.read(UBIFS_COMMON_HDR_SZ))
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import struct
|
|||||||
from ubifs.defines import *
|
from ubifs.defines import *
|
||||||
from ubifs.misc import decompress
|
from ubifs.misc import decompress
|
||||||
|
|
||||||
|
|
||||||
def dents(ubifs, inodes, dent_node, path='', perms=False):
|
def dents(ubifs, inodes, dent_node, path='', perms=False):
|
||||||
inode = inodes[dent_node.inum]
|
inode = inodes[dent_node.inum]
|
||||||
dent_path = os.path.join(path, dent_node.name)
|
dent_path = os.path.join(path, dent_node.name)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
from ubifs import extract
|
from ubifs import extract
|
||||||
from ubifs.defines import *
|
from ubifs.defines import *
|
||||||
|
|
||||||
|
|
||||||
def index(ubifs, lnum, offset, inodes={}):
|
def index(ubifs, lnum, offset, inodes={}):
|
||||||
chdr = extract.common_hdr(ubifs, lnum, offset)
|
chdr = extract.common_hdr(ubifs, lnum, offset)
|
||||||
if chdr.node_type == UBIFS_IDX_NODE:
|
if chdr.node_type == UBIFS_IDX_NODE:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from ubifs.defines import PRINT_UBIFS_KEY_HASH, PRINT_UBIFS_COMPR
|
|||||||
from ubi.defines import PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
|
from ubi.defines import PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
|
||||||
output_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'output')
|
output_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'output')
|
||||||
|
|
||||||
|
|
||||||
def extract_files(ubifs, out_path, perms=False):
|
def extract_files(ubifs, out_path, perms=False):
|
||||||
try:
|
try:
|
||||||
inodes = {}
|
inodes = {}
|
||||||
|
|||||||
@@ -39,22 +39,27 @@ else:
|
|||||||
from Screens.Console import Console
|
from Screens.Console import Console
|
||||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
|
||||||
|
|
||||||
|
|
||||||
def getDS():
|
def getDS():
|
||||||
s = getDesktop(0).size()
|
s = getDesktop(0).size()
|
||||||
return (s.width(), s.height())
|
return (s.width(), s.height())
|
||||||
|
|
||||||
|
|
||||||
def isFHD():
|
def isFHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] == 1920
|
return desktopSize[0] == 1920
|
||||||
|
|
||||||
|
|
||||||
def isHD():
|
def isHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] >= 1280 and desktopSize[0] < 1920
|
return desktopSize[0] >= 1280 and desktopSize[0] < 1920
|
||||||
|
|
||||||
|
|
||||||
def isUHD():
|
def isUHD():
|
||||||
desktopSize = getDS()
|
desktopSize = getDS()
|
||||||
return desktopSize[0] >= 1920 and desktopSize[0] < 3840
|
return desktopSize[0] >= 1920 and desktopSize[0] < 3840
|
||||||
|
|
||||||
|
|
||||||
class InstallImage(Screen, ConfigListScreen):
|
class InstallImage(Screen, ConfigListScreen):
|
||||||
if isFHD():
|
if isFHD():
|
||||||
skin = """<screen position="130,120" size="1650,875" title="NeoBoot - Installation">
|
skin = """<screen position="130,120" size="1650,875" title="NeoBoot - Installation">
|
||||||
|
|||||||
Reference in New Issue
Block a user