Fix jsontools ERROR

This commit is contained in:
Alhaziel01
2021-11-05 18:08:02 +01:00
parent 5e08aa3391
commit 70f69acfff
2 changed files with 8 additions and 10 deletions

View File

@@ -364,15 +364,14 @@ class Item(object):
if "?" in url:
url = url.split("?")[1]
decoded = False
if url:
try:
str_item = base64.b64decode(urllib.unquote(url))
json_item = json.load(str_item, object_hook=self.toutf8)
if json_item is not None and len(json_item) > 0:
self.__dict__.update(json_item)
decoded = True
except:
pass
try:
str_item = base64.b64decode(urllib.unquote(url))
json_item = json.load(str_item, object_hook=self.toutf8)
if json_item is not None and len(json_item) > 0:
self.__dict__.update(json_item)
decoded = True
except:
pass
if not decoded:
url = urllib.unquote_plus(url)

View File

@@ -395,7 +395,6 @@ def viewmodeMonitor():
currentModeName = xbmc.getInfoLabel('Container.Viewmode')
parent_info = xbmc.getInfoLabel('Container.FolderPath')
item_info = xbmc.getInfoLabel('Container.ListItemPosition(2).FileNameAndPath')
parent_item = Item().fromurl(parent_info)
win = xbmcgui.Window(10025)
currentMode = int(win.getFocusId())
# logger.debug('CM', currentMode, 'CN',currentModeName, 'label',xbmc.getInfoLabel('Container.FolderPath'))