I did some additional debugging and the issue appears to be related to urllib within LibreElec. I created a simple script and ran it from the Python REP under Python on Windows and Python on LibreElec :
Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32
import urllib.request, urllib.parse, urllib.error
arg1 = "?contentdirectory=http://192.168.0.34:53168/ContentDirecto…tID=taz1l0z1l13"
args = urllib.parse.parse_qs(arg1)
print(arg1)
?contentdirectory=http://192.168.0.34:53168/ContentDirecto…tID=taz1l0z1l13
print(str(args))
{'?contentdirectory': ['http://192.168.0.34:53168/ContentDirectory/control'], 'mode': ['server'], 'objectID': ['taz1l0z1l13']}
Python 3.8.8 (default, Mar 11 2021, 14:17:31) [GCC 10.2.0] on linux
import urllib.request, urllib.parse, urllib.error
arg1 = "?contentdirectory=http://192.168.0.34:53168/ContentDirecto…tID=taz1l0z1l13"
args = urllib.parse.parse_qs(arg1)
print(arg1)
?contentdirectory=http://192.168.0.34:53168/ContentDirecto…tID=taz1l0z1l13
print(str(args))
{'?contentdirectory': ['http://192.168.0.34:53168/ContentDirecto…tID=taz1l0z1l13']}
On LibreElec arg1 is not parsed to a dictionary. Under Python on Windows it is.
Jeff