Isue widgets top250 TVShows: version-1.0.23
Closed this issue · 3 comments
missing def. for KODI_VERSION in script.skin.helper.widgets\resources\lib\utils.py
http://forum.kodi.tv/showthread.php?tid=235676&pid=2538997#pid2538997
`ADDON_ID = "script.skin.helper.widgets"
KODI_VERSION = int(xbmc.getInfoLabel("System.BuildVersion").split(".")[0])
KODILANGUAGE = xbmc.getLanguage(xbmc.ISO_639_1)
def kodi_json(jsonmethod, params=None, returntype=None):
'''get info from the kodi json api'''
kodi_json = {}
kodi_json["jsonrpc"] = "2.0"
kodi_json["method"] = jsonmethod
if not params:
params = {}
kodi_json["params"] = params
kodi_json["id"] = 1
json_response = xbmc.executeJSONRPC(try_encode(json.dumps(kodi_json)))
json_object = json.loads(json_response.decode('utf-8', 'replace'))
# set the default returntype to prevent errors
if "details" in jsonmethod.lower():
result = {}
else:
result = []
if 'result' in json_object:
if returntype and returntype in json_object['result']:
# returntype specified, return immediately
result = json_object['result'][returntype]
else:
# no returntype specified, we'll have to look for it
if isinstance(json_object['result'], dict):
for key, value in json_object['result'].iteritems():
if not key == "limits":
result = value
break
else:
return json_object['result']
else:
log_msg(json_response)
log_msg(kodi_json)
return result`
There is no error in your report
yes, have error...
08:19:11.551 T:4440 ERROR: Skin Helper Widgets --> Exception in main ! --> cannot import name kodi_json
will be fixed in next update, thanks