Fix jsontools ERROR
This commit is contained in:
+8
-9
@@ -364,15 +364,14 @@ class Item(object):
|
|||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url.split("?")[1]
|
url = url.split("?")[1]
|
||||||
decoded = False
|
decoded = False
|
||||||
if url:
|
try:
|
||||||
try:
|
str_item = base64.b64decode(urllib.unquote(url))
|
||||||
str_item = base64.b64decode(urllib.unquote(url))
|
json_item = json.load(str_item, object_hook=self.toutf8)
|
||||||
json_item = json.load(str_item, object_hook=self.toutf8)
|
if json_item is not None and len(json_item) > 0:
|
||||||
if json_item is not None and len(json_item) > 0:
|
self.__dict__.update(json_item)
|
||||||
self.__dict__.update(json_item)
|
decoded = True
|
||||||
decoded = True
|
except:
|
||||||
except:
|
pass
|
||||||
pass
|
|
||||||
|
|
||||||
if not decoded:
|
if not decoded:
|
||||||
url = urllib.unquote_plus(url)
|
url = urllib.unquote_plus(url)
|
||||||
|
|||||||
@@ -395,7 +395,6 @@ def viewmodeMonitor():
|
|||||||
currentModeName = xbmc.getInfoLabel('Container.Viewmode')
|
currentModeName = xbmc.getInfoLabel('Container.Viewmode')
|
||||||
parent_info = xbmc.getInfoLabel('Container.FolderPath')
|
parent_info = xbmc.getInfoLabel('Container.FolderPath')
|
||||||
item_info = xbmc.getInfoLabel('Container.ListItemPosition(2).FileNameAndPath')
|
item_info = xbmc.getInfoLabel('Container.ListItemPosition(2).FileNameAndPath')
|
||||||
parent_item = Item().fromurl(parent_info)
|
|
||||||
win = xbmcgui.Window(10025)
|
win = xbmcgui.Window(10025)
|
||||||
currentMode = int(win.getFocusId())
|
currentMode = int(win.getFocusId())
|
||||||
# logger.debug('CM', currentMode, 'CN',currentModeName, 'label',xbmc.getInfoLabel('Container.FolderPath'))
|
# logger.debug('CM', currentMode, 'CN',currentModeName, 'label',xbmc.getInfoLabel('Container.FolderPath'))
|
||||||
|
|||||||
Reference in New Issue
Block a user