Jump to content


Dimitrij

Member Since 24 Apr 2011
Offline Last Active Yesterday, 19:52
*****

Posts I've Made

In Topic: attached usb drives partitions mounted at same point

Yesterday, 09:20

This?

 

Please answer in telnet:

for D in /sys/block/sd*; do echo "$D : $(readlink -fn $D/device)"; done

 


In Topic: Slow zap for CI

25 November 2022 - 13:37

ОpenATV 7.2

Version plugin 2.7?


In Topic: OpenPLi-py3

21 November 2022 - 18:31

In NumberZapExt.py on line 62 - why this encode ? => bytes ?

 

result[id]['title'] = (result[id].get('title', '') or id.replace('_', ' ').title()).encode('UTF-8')

 

remove encode and it coud work without next changes...

ver 1.22 - fix python3(str bytes)


In Topic: OpenPLi-py3

21 November 2022 - 14:41

 

@Dima - how can I simulate pass to this line ?

"Enable number hotkeys"


In Topic: OpenPLi-py3

21 November 2022 - 06:34

Help.

 

15:08:10.8284   File "/usr/lib/enigma2/python/Plugins/SystemPlugins/NumberZapExt/NumberZapExt.py", line 522, in printLabels
15:08:10.8292     self.setTitle(str(self.field) + (" ") + name)
15:08:10.8292 TypeError: can only concatenate str (not "bytes") to str

				if name == 'N/A':
					if not service is None:
						name = _("service not found")
					else:
						name = _("invalid channel number")
						self.action = self.getHotkeyAction(int(self.field))
						if self.action:
							name = _(ACTIONLIST[self.action]['title'])
							channel = _("Action:")
							bouquet = bqname = ""
							service = None

self.setTitle(str(self.field) + (" ") + name)
def getActions(xmlfile, hotkeys={}):
	result = {}
	try:
		import xml.etree.cElementTree
		root = xml.etree.cElementTree.parse(xmlfile).getroot()
	except:
		root = None
	if not root is None:
		for item in root.findall('action'):
			id = item.get('id')
			if id:
				result[id] = item.attrib.copy()
				result[id]['title'] = (result[id].get('title', '') or id.replace('_', ' ').title()).encode('UTF-8')
				result[id]['hotkey'] = int(result[id].get('hotkey', 0)) or hotkeys.get(id, 0)
				if result[id].get('type', '') in ('screen', 'code'):
					result[id]['args'] = item.text or ''
				result[id].pop('id')
	return result

ACTIONLIST = getActions('%s/actions.xml' % (PLUGIN_PATH), eval(config.plugins.NumberZapExt.hotkeys.value))

 

https://github.com/D...ended-NumberZap