Jump to content


longtimeuser

Member Since 6 Feb 2022
Offline Last Active 08 Jun 2024 16:03
-----

Posts I've Made

In Topic: Installing yt-dlp on OpenPLi 9.0 - is there any way?

7 June 2024 - 12:54

I had the same problem. Finally found two simple solutions.

 

Solution one

Goto official python site (h**ps://www.python.org/downloads/release/python-390/) (OpenPli 9.0 uses python version 3.9) download tarball,

extract missing dataclasses.py and copy it to /usr/lib/python3.9/ on your box.

 

Solutions two (recommended)

Install a package which contains the missing dataclasses.pyc:

> opkg install python-3-profile

 

Thats all. Happy yt-dlp - ing!


In Topic: Vu+ 4K Multiboot

2 April 2024 - 16:17

sorry again, compared not the dev branch. here is the right one (also shorter):

diff -Nuar a/Multiboot.py b/Multiboot.py
--- a/Multiboot.py	2024-03-22 20:00:45.199600100 +0100
+++ b/Multiboot.py	2024-04-02 16:54:18.855200100 +0200
@@ -9,6 +9,7 @@
 
 class tmp:
 	dir = None
+	bootargs = ""
 
 
 def getMultibootStartupDevice():
@@ -25,6 +26,8 @@
 				Console().ePopen('mount %s %s' % (device, tmp.dir))
 			if os.path.isfile(os.path.join(tmp.dir, "STARTUP")):
 				print('[Multiboot] Startupdevice found:', device)
+				tmp.bootargs = open(os.path.join(tmp.dir, "STARTUP"), 'r').read().split("'")[1]
+				print('[Multiboot] bootargs:', tmp.bootargs)
 				return device
 			Console().ePopen('umount %s' % tmp.dir)
 	if not os.path.ismount(tmp.dir):
@@ -73,25 +76,34 @@
 	return bootslots
 
 
+def getBootargs():
+	if os.path.isfile('/sys/firmware/devicetree/base/chosen/bootargs'):
+		return open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read()
+	else:
+		if tmp.bootargs == "":
+			getMultibootStartupDevice()
+		return tmp.bootargs
+
+
 def getCurrentImage():
 	if BoxInfo.getItem("canMultiBoot"):
 		if BoxInfo.getItem("hasKexec"):	# kexec kernel multiboot
-			rootsubdir = [x for x in open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().split() if x.startswith("rootsubdir")]
+			rootsubdir = [x for x in getBootargs().split() if x.startswith("rootsubdir")]
 			char = "/" if "/" in rootsubdir[0] else "="
 			return int(rootsubdir[0].rsplit(char, 1)[1][11:])
 		else: #legacy multiboot
-			slot = [x[-1] for x in open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().split() if x.startswith('rootsubdir')]
+			slot = [x[-1] for x in getBootargs().split() if x.startswith('rootsubdir')]
 			if slot:
 				return int(slot[0])
 			else:
-				device = getparam(open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read(), 'root')
+				device = getparam(getBootargs(), 'root')
 				for slot in BoxInfo.getItem("canMultiBoot").keys():
 					if BoxInfo.getItem("canMultiBoot")[slot]['device'] == device:
 						return slot
 
 
 def getCurrentImageMode():
-	return bool(BoxInfo.getItem("canMultiBoot")) and BoxInfo.getItem("canMode12") and int(open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().replace('\0', '').split('=')[-1])
+	return bool(BoxInfo.getItem("canMultiBoot")) and BoxInfo.getItem("canMode12") and int(getBootargs().replace('\0', '').split('=')[-1])
 
 
 def deleteImage(slot):
@@ -147,7 +159,28 @@
 					date = max(date, datetime.fromtimestamp(os.stat(os.path.join(imagedir, "usr/bin/enigma2")).st_mtime).strftime('%Y-%m-%d'))
 				except:
 					date = _("Unknown")
-				imagelist[slot] = {'imagename': "%s (%s)" % (open(os.path.join(imagedir, "etc/issue")).readlines()[-2].capitalize().strip()[:-6], date)}
+				imagename = open(os.path.join(imagedir, "etc/issue")).readlines()[-2].capitalize().strip()[:-6]
+				if imagename == "" and os.path.isfile(os.path.join(imagedir, 'etc/image-version')):
+					imageversion = {}
+					with open(os.path.join(imagedir, 'etc/image-version')) as ivfile:
+						for line in ivfile:
+							key, val = line.partition("=")[::2]
+							imageversion[key.strip()] = val.replace("\n", "")
+					imagename = imageversion["creator"].split(" ")[0]+" "+str(int(imageversion["version"][0:3]))+"."+str(int(imageversion["version"][3:6]))
+				imagelist[slot] = {'imagename': "%s (%s)" % (imagename, date)}
+			elif os.path.isfile(os.path.join(imagedir, 'usr/bin/neutrino')):
+				try:
+					from datetime import datetime
+					date = datetime.fromtimestamp(os.stat(os.path.join(imagedir, "usr/bin/neutrino")).st_mtime).strftime('%Y-%m-%d')
+				except:
+					date = _("Unknown")
+				imageversion = {}
+				with open(os.path.join(imagedir, 'usr/lib/enigma.info')) as ivfile:
+					for line in ivfile:
+						key, val = line.partition("=")[::2]
+						imageversion[key.strip()] = val.replace("\n", "")
+				imagename = imageversion["displaydistro"].replace("-Neutrino", "") + " " + imageversion["imgversion"]
+				imagelist[slot] = {'imagename': "%s (%s)" % (imagename, date)}
 			elif os.path.isfile(os.path.join(imagedir, 'usr/bin/enigma2.bak')):
 				imagelist[slot] = {'imagename': _("Deleted image")}
 			else:

 


In Topic: Vu+ 4K Multiboot

2 April 2024 - 16:04

one can add the global variable bootargs to the tmp class, which is in fact also a global variable.

 

so here again:

diff -Nuar a/Multiboot.py b/Multiboot.py
--- a/Multiboot.py	2024-03-22 20:00:45.199600100 +0100
+++ b/Multiboot.py	2024-04-02 16:57:13.839200100 +0200
@@ -1,4 +1,4 @@
-from Components.SystemInfo import BoxInfo
+from Components.SystemInfo import SystemInfo
 from Components.Console import Console
 from Tools.Directories import fileHas, fileExists
 import os
@@ -9,11 +9,12 @@
 
 class tmp:
 	dir = None
+	bootargs = ""
 
 
 def getMultibootStartupDevice():
 	tmp.dir = tempfile.mkdtemp(prefix="Multiboot")
-	if BoxInfo.getItem("hasKexec"): # kexec kernel multiboot
+	if SystemInfo["hasKexec"]: # kexec kernel multiboot
 		bootList = ("/dev/mmcblk0p4", "/dev/mmcblk0p7", "/dev/mmcblk0p9")
 	else: #legacy multiboot
 		bootList = ("/dev/mmcblk0p1", "/dev/mmcblk1p1", "/dev/mmcblk0p3", "/dev/mmcblk0p4", "/dev/mtdblock2", "/dev/block/by-name/bootoptions")
@@ -25,6 +26,8 @@
 				Console().ePopen('mount %s %s' % (device, tmp.dir))
 			if os.path.isfile(os.path.join(tmp.dir, "STARTUP")):
 				print('[Multiboot] Startupdevice found:', device)
+				tmp.bootargs = open(os.path.join(tmp.dir, "STARTUP"), 'r').read().split("'")[1]
+				print('[Multiboot] bootargs:', tmp.bootargs)
 				return device
 			Console().ePopen('umount %s' % tmp.dir)
 	if not os.path.ismount(tmp.dir):
@@ -38,7 +41,7 @@
 def getMultibootslots():
 	bootslots = {}
 	mode12found = False
-	if BoxInfo.getItem("MultibootStartupDevice"):
+	if SystemInfo["MultibootStartupDevice"]:
 		for file in glob.glob(os.path.join(tmp.dir, 'STARTUP_*')):
 			if 'MODE_' in file:
 				mode12found = True
@@ -65,7 +68,7 @@
 		Console().ePopen('umount %s' % tmp.dir)
 		if not os.path.ismount(tmp.dir):
 			os.rmdir(tmp.dir)
-		if not mode12found and BoxInfo.getItem("canMode12"):
+		if not mode12found and SystemInfo["canMode12"]:
 			#the boot device has ancient content and does not contain the correct STARTUP files
 			for slot in range(1, 5):
 				bootslots[slot] = {'device': '/dev/mmcblk0p%s' % (slot * 2 + 1), 'startupfile': None}
@@ -73,31 +76,40 @@
 	return bootslots
 
 
+def getBootargs():
+	if os.path.isfile('/sys/firmware/devicetree/base/chosen/bootargs'):
+		return open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read()
+	else:
+		if tmp.bootargs == "":
+			getMultibootStartupDevice()
+		return tmp.bootargs
+
+
 def getCurrentImage():
-	if BoxInfo.getItem("canMultiBoot"):
-		if BoxInfo.getItem("hasKexec"):	# kexec kernel multiboot
-			rootsubdir = [x for x in open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().split() if x.startswith("rootsubdir")]
+	if SystemInfo["canMultiBoot"]:
+		if SystemInfo["hasKexec"]:	# kexec kernel multiboot
+			rootsubdir = [x for x in getBootargs().split() if x.startswith("rootsubdir")]
 			char = "/" if "/" in rootsubdir[0] else "="
 			return int(rootsubdir[0].rsplit(char, 1)[1][11:])
 		else: #legacy multiboot
-			slot = [x[-1] for x in open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().split() if x.startswith('rootsubdir')]
+			slot = [x[-1] for x in getBootargs().split() if x.startswith('rootsubdir')]
 			if slot:
 				return int(slot[0])
 			else:
-				device = getparam(open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read(), 'root')
-				for slot in BoxInfo.getItem("canMultiBoot").keys():
-					if BoxInfo.getItem("canMultiBoot")[slot]['device'] == device:
+				device = getparam(getBootargs(), 'root')
+				for slot in SystemInfo["canMultiBoot"].keys():
+					if SystemInfo["canMultiBoot"][slot]['device'] == device:
 						return slot
 
 
 def getCurrentImageMode():
-	return bool(BoxInfo.getItem("canMultiBoot")) and BoxInfo.getItem("canMode12") and int(open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().replace('\0', '').split('=')[-1])
+	return bool(SystemInfo["canMultiBoot"]) and SystemInfo["canMode12"] and int(getBootargs().replace('\0', '').split('=')[-1])
 
 
 def deleteImage(slot):
 	tmp.dir = tempfile.mkdtemp(prefix="Multiboot")
-	Console().ePopen('mount %s %s' % (BoxInfo.getItem("canMultiBoot")[slot]['device'], tmp.dir))
-	enigma2binaryfile = os.path.join(os.sep.join(filter(None, [tmp.dir, BoxInfo.getItem("canMultiBoot")[slot].get('rootsubdir', '')])), 'usr/bin/enigma2')
+	Console().ePopen('mount %s %s' % (SystemInfo["canMultiBoot"][slot]['device'], tmp.dir))
+	enigma2binaryfile = os.path.join(os.sep.join(filter(None, [tmp.dir, SystemInfo["canMultiBoot"][slot].get('rootsubdir', '')])), 'usr/bin/enigma2')
 	if os.path.exists(enigma2binaryfile):
 		os.rename(enigma2binaryfile, '%s.bak' % enigma2binaryfile)
 	Console().ePopen('umount %s' % tmp.dir)
@@ -106,10 +118,10 @@
 
 
 def restoreImages():
-	for slot in BoxInfo.getItem("canMultiBoot"):
+	for slot in SystemInfo["canMultiBoot"]:
 		tmp.dir = tempfile.mkdtemp(prefix="Multiboot")
-		Console().ePopen('mount %s %s' % (BoxInfo.getItem("canMultiBoot")[slot]['device'], tmp.dir))
-		enigma2binaryfile = os.path.join(os.sep.join(filter(None, [tmp.dir, BoxInfo.getItem("canMultiBoot")[slot].get('rootsubdir', '')])), 'usr/bin/enigma2')
+		Console().ePopen('mount %s %s' % (SystemInfo["canMultiBoot"][slot]['device'], tmp.dir))
+		enigma2binaryfile = os.path.join(os.sep.join(filter(None, [tmp.dir, SystemInfo["canMultiBoot"][slot].get('rootsubdir', '')])), 'usr/bin/enigma2')
 		if os.path.exists('%s.bak' % enigma2binaryfile):
 			os.rename('%s.bak' % enigma2binaryfile, enigma2binaryfile)
 		Console().ePopen('umount %s' % tmp.dir)
@@ -130,14 +142,14 @@
 
 def getImagelist():
 	imagelist = {}
-	if BoxInfo.getItem("canMultiBoot"):
+	if SystemInfo["canMultiBoot"]:
 		tmp.dir = tempfile.mkdtemp(prefix="Multiboot")
-		for slot in sorted(BoxInfo.getItem("canMultiBoot").keys()):
-			if BoxInfo.getItem("canMultiBoot")[slot]['device'] == 'ubi0:ubifs':
-				Console().ePopen('mount -t ubifs %s %s' % (BoxInfo.getItem("canMultiBoot")[slot]['device'], tmp.dir))
+		for slot in sorted(SystemInfo["canMultiBoot"].keys()):
+			if SystemInfo["canMultiBoot"][slot]['device'] == 'ubi0:ubifs':
+				Console().ePopen('mount -t ubifs %s %s' % (SystemInfo["canMultiBoot"][slot]['device'], tmp.dir))
 			else:
-				Console().ePopen('mount %s %s' % (BoxInfo.getItem("canMultiBoot")[slot]['device'], tmp.dir))
-			imagedir = os.sep.join(filter(None, [tmp.dir, BoxInfo.getItem("canMultiBoot")[slot].get('rootsubdir', '')]))
+				Console().ePopen('mount %s %s' % (SystemInfo["canMultiBoot"][slot]['device'], tmp.dir))
+			imagedir = os.sep.join(filter(None, [tmp.dir, SystemInfo["canMultiBoot"][slot].get('rootsubdir', '')]))
 			if os.path.isfile(os.path.join(imagedir, 'usr/bin/enigma2')):
 				try:
 					from datetime import datetime
@@ -147,7 +159,29 @@
 					date = max(date, datetime.fromtimestamp(os.stat(os.path.join(imagedir, "usr/bin/enigma2")).st_mtime).strftime('%Y-%m-%d'))
 				except:
 					date = _("Unknown")
-				imagelist[slot] = {'imagename': "%s (%s)" % (open(os.path.join(imagedir, "etc/issue")).readlines()[-2].capitalize().strip()[:-6], date)}
+				imagename = open(os.path.join(imagedir, "etc/issue")).readlines()[-2].capitalize().strip()[:-6]
+				if imagename == "" and os.path.isfile(os.path.join(imagedir, 'etc/image-version')):
+					imagename = open(os.path.join(imagedir, "etc/issue")).readlines()[0].capitalize().strip()
+					imageversion = {}
+					with open(os.path.join(imagedir, 'etc/image-version')) as ivfile:
+						for line in ivfile:
+							key, val = line.partition("=")[::2]
+							imageversion[key.strip()] = val.replace("\n", "")
+					imagename = imageversion["creator"].split(" ")[0]+" "+str(int(imageversion["version"][0:3]))+"."+str(int(imageversion["version"][3:6]))
+				imagelist[slot] = {'imagename': "%s (%s)" % (imagename, date)}
+			elif os.path.isfile(os.path.join(imagedir, 'usr/bin/neutrino')):
+				try:
+					from datetime import datetime
+					date = datetime.fromtimestamp(os.stat(os.path.join(imagedir, "usr/bin/neutrino")).st_mtime).strftime('%Y-%m-%d')
+				except:
+					date = _("Unknown")
+				imageversion = {}
+				with open(os.path.join(imagedir, 'usr/lib/enigma.info')) as ivfile:
+					for line in ivfile:
+						key, val = line.partition("=")[::2]
+						imageversion[key.strip()] = val.replace("\n", "")
+				imagename = imageversion["displaydistro"].replace("-Neutrino", "") + " " + imageversion["imgversion"]
+				imagelist[slot] = {'imagename': "%s (%s)" % (imagename, date)}
 			elif os.path.isfile(os.path.join(imagedir, 'usr/bin/enigma2.bak')):
 				imagelist[slot] = {'imagename': _("Deleted image")}
 			else:


In Topic: Vu+ 4K Multiboot

31 March 2024 - 19:57

sorry, checked again, and forgot one important statement: "global bootargs"

 

so here again:

diff -Nuar a/Multiboot.py b/Multiboot.py
--- a/Multiboot.py	2024-03-22 20:00:45.199600100 +0100
+++ b/Multiboot.py	2024-03-31 20:51:41.078000000 +0200
@@ -10,8 +10,11 @@
 class tmp:
 	dir = None
 
+bootargs = ""
+
 
 def getMultibootStartupDevice():
+	global bootargs
 	tmp.dir = tempfile.mkdtemp(prefix="Multiboot")
 	if BoxInfo.getItem("hasKexec"): # kexec kernel multiboot
 		bootList = ("/dev/mmcblk0p4", "/dev/mmcblk0p7", "/dev/mmcblk0p9")
@@ -25,6 +28,8 @@
 				Console().ePopen('mount %s %s' % (device, tmp.dir))
 			if os.path.isfile(os.path.join(tmp.dir, "STARTUP")):
 				print('[Multiboot] Startupdevice found:', device)
+				bootargs = open(os.path.join(tmp.dir, "STARTUP"), 'r').read().split("'")[1]
+				print('[Multiboot] bootargs:', bootargs)
 				return device
 			Console().ePopen('umount %s' % tmp.dir)
 	if not os.path.ismount(tmp.dir):
@@ -73,25 +78,34 @@
 	return bootslots
 
 
+def getBootargs():
+	if os.path.isfile('/sys/firmware/devicetree/base/chosen/bootargs'):
+		return open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read()
+	else:
+		if bootargs == "":
+			getMultibootStartupDevice()
+		return bootargs
+
+
 def getCurrentImage():
 	if BoxInfo.getItem("canMultiBoot"):
 		if BoxInfo.getItem("hasKexec"):	# kexec kernel multiboot
-			rootsubdir = [x for x in open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().split() if x.startswith("rootsubdir")]
+			rootsubdir = [x for x in getBootargs().split() if x.startswith("rootsubdir")]
 			char = "/" if "/" in rootsubdir[0] else "="
 			return int(rootsubdir[0].rsplit(char, 1)[1][11:])
 		else: #legacy multiboot
-			slot = [x[-1] for x in open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().split() if x.startswith('rootsubdir')]
+			slot = [x[-1] for x in getBootargs().split() if x.startswith('rootsubdir')]
 			if slot:
 				return int(slot[0])
 			else:
-				device = getparam(open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read(), 'root')
+				device = getparam(getBootargs(), 'root')
 				for slot in BoxInfo.getItem("canMultiBoot").keys():
 					if BoxInfo.getItem("canMultiBoot")[slot]['device'] == device:
 						return slot
 
 
 def getCurrentImageMode():
-	return bool(BoxInfo.getItem("canMultiBoot")) and BoxInfo.getItem("canMode12") and int(open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().replace('\0', '').split('=')[-1])
+	return bool(BoxInfo.getItem("canMultiBoot")) and BoxInfo.getItem("canMode12") and int(getBootargs().replace('\0', '').split('=')[-1])
 
 
 def deleteImage(slot):
@@ -147,7 +161,28 @@
 					date = max(date, datetime.fromtimestamp(os.stat(os.path.join(imagedir, "usr/bin/enigma2")).st_mtime).strftime('%Y-%m-%d'))
 				except:
 					date = _("Unknown")
-				imagelist[slot] = {'imagename': "%s (%s)" % (open(os.path.join(imagedir, "etc/issue")).readlines()[-2].capitalize().strip()[:-6], date)}
+				imagename = open(os.path.join(imagedir, "etc/issue")).readlines()[-2].capitalize().strip()[:-6]
+				if imagename == "" and os.path.isfile(os.path.join(imagedir, 'etc/image-version')):
+					imageversion = {}
+					with open(os.path.join(imagedir, 'etc/image-version')) as ivfile:
+						for line in ivfile:
+							key, val = line.partition("=")[::2]
+							imageversion[key.strip()] = val.replace("\n", "")
+					imagename = imageversion["creator"].split(" ")[0]+" "+str(int(imageversion["version"][0:3]))+"."+str(int(imageversion["version"][3:6]))
+				imagelist[slot] = {'imagename': "%s (%s)" % (imagename, date)}
+			elif os.path.isfile(os.path.join(imagedir, 'usr/bin/neutrino')):
+				try:
+					from datetime import datetime
+					date = datetime.fromtimestamp(os.stat(os.path.join(imagedir, "usr/bin/neutrino")).st_mtime).strftime('%Y-%m-%d')
+				except:
+					date = _("Unknown")
+				imageversion = {}
+				with open(os.path.join(imagedir, 'usr/lib/enigma.info')) as ivfile:
+					for line in ivfile:
+						key, val = line.partition("=")[::2]
+						imageversion[key.strip()] = val.replace("\n", "")
+				imagename = imageversion["displaydistro"].replace("-Neutrino", "") + " " + imageversion["imgversion"]
+				imagelist[slot] = {'imagename': "%s (%s)" % (imagename, date)}
 			elif os.path.isfile(os.path.join(imagedir, 'usr/bin/enigma2.bak')):
 				imagelist[slot] = {'imagename': _("Deleted image")}
 			else:

 


In Topic: Vu+ 4K Multiboot

31 March 2024 - 19:47

Got it. Output is now much shorter:

diff -Nuar a/Multiboot.py b/Multiboot.py
--- a/Multiboot.py	2024-03-22 20:00:45.199600100 +0100
+++ b/Multiboot.py	2024-03-22 20:12:34.340600100 +0100
@@ -10,6 +10,8 @@
 class tmp:
 	dir = None
 
+bootargs = ""
+
 
 def getMultibootStartupDevice():
 	tmp.dir = tempfile.mkdtemp(prefix="Multiboot")
@@ -25,6 +27,8 @@
 				Console().ePopen('mount %s %s' % (device, tmp.dir))
 			if os.path.isfile(os.path.join(tmp.dir, "STARTUP")):
 				print('[Multiboot] Startupdevice found:', device)
+				bootargs = open(os.path.join(tmp.dir, "STARTUP"), 'r').read().split("'")[1]
+				print('[Multiboot] bootargs:', bootargs)
 				return device
 			Console().ePopen('umount %s' % tmp.dir)
 	if not os.path.ismount(tmp.dir):
@@ -73,25 +77,34 @@
 	return bootslots
 
 
+def getBootargs():
+	if os.path.isfile('/sys/firmware/devicetree/base/chosen/bootargs'):
+		return open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read()
+	else:
+		if bootargs == "":
+			getMultibootStartupDevice()
+		return bootargs
+
+
 def getCurrentImage():
 	if BoxInfo.getItem("canMultiBoot"):
 		if BoxInfo.getItem("hasKexec"):	# kexec kernel multiboot
-			rootsubdir = [x for x in open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().split() if x.startswith("rootsubdir")]
+			rootsubdir = [x for x in getBootargs().split() if x.startswith("rootsubdir")]
 			char = "/" if "/" in rootsubdir[0] else "="
 			return int(rootsubdir[0].rsplit(char, 1)[1][11:])
 		else: #legacy multiboot
-			slot = [x[-1] for x in open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().split() if x.startswith('rootsubdir')]
+			slot = [x[-1] for x in getBootargs().split() if x.startswith('rootsubdir')]
 			if slot:
 				return int(slot[0])
 			else:
-				device = getparam(open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read(), 'root')
+				device = getparam(getBootargs(), 'root')
 				for slot in BoxInfo.getItem("canMultiBoot").keys():
 					if BoxInfo.getItem("canMultiBoot")[slot]['device'] == device:
 						return slot
 
 
 def getCurrentImageMode():
-	return bool(BoxInfo.getItem("canMultiBoot")) and BoxInfo.getItem("canMode12") and int(open('/sys/firmware/devicetree/base/chosen/bootargs', 'r').read().replace('\0', '').split('=')[-1])
+	return bool(BoxInfo.getItem("canMultiBoot")) and BoxInfo.getItem("canMode12") and int(getBootargs().replace('\0', '').split('=')[-1])
 
 
 def deleteImage(slot):
@@ -147,7 +160,28 @@
 					date = max(date, datetime.fromtimestamp(os.stat(os.path.join(imagedir, "usr/bin/enigma2")).st_mtime).strftime('%Y-%m-%d'))
 				except:
 					date = _("Unknown")
-				imagelist[slot] = {'imagename': "%s (%s)" % (open(os.path.join(imagedir, "etc/issue")).readlines()[-2].capitalize().strip()[:-6], date)}
+				imagename = open(os.path.join(imagedir, "etc/issue")).readlines()[-2].capitalize().strip()[:-6]
+				if imagename == "" and os.path.isfile(os.path.join(imagedir, 'etc/image-version')):
+					imageversion = {}
+					with open(os.path.join(imagedir, 'etc/image-version')) as ivfile:
+						for line in ivfile:
+							key, val = line.partition("=")[::2]
+							imageversion[key.strip()] = val.replace("\n", "")
+					imagename = imageversion["creator"].split(" ")[0]+" "+str(int(imageversion["version"][0:3]))+"."+str(int(imageversion["version"][3:6]))
+				imagelist[slot] = {'imagename': "%s (%s)" % (imagename, date)}
+			elif os.path.isfile(os.path.join(imagedir, 'usr/bin/neutrino')):
+				try:
+					from datetime import datetime
+					date = datetime.fromtimestamp(os.stat(os.path.join(imagedir, "usr/bin/neutrino")).st_mtime).strftime('%Y-%m-%d')
+				except:
+					date = _("Unknown")
+				imageversion = {}
+				with open(os.path.join(imagedir, 'usr/lib/enigma.info')) as ivfile:
+					for line in ivfile:
+						key, val = line.partition("=")[::2]
+						imageversion[key.strip()] = val.replace("\n", "")
+				imagename = imageversion["displaydistro"].replace("-Neutrino", "") + " " + imageversion["imgversion"]
+				imagelist[slot] = {'imagename': "%s (%s)" % (imagename, date)}
 			elif os.path.isfile(os.path.join(imagedir, 'usr/bin/enigma2.bak')):
 				imagelist[slot] = {'imagename': _("Deleted image")}
 			else: