2015-10-25, 18:25
Thanks for taking the time from more important stuff to explain the obvious to a python virgin. Python 2.7 is not available on all platforms so simplejson is the best sometimes and we should still check the version?
query_dict = {"jsonrpc": "2.0", "method": "AudioLibrary.GetAlbumDetails", "params": {"albumid": int(ALBUMDBID), "properties": ["artistid"]}, "id": 1}
json_query = xbmc.executeJSONRPC(json.dumps(query_dict))
json_query = xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "AudioLibrary.GetAlbumDetails", "params": {"albumid": %d, "properties": ["artistid"]}, "id": 1 }' % int(ALBUMDBID))
if 'result' in json_response and 'albumdetails' in json_response['result']:
if json_response.has_key('result') and (json_response['result'] != None) and json_response['result'].has_key('albumdetails'):