def sendJSON(command):
    data = ''
    try:
        data = xbmc.executeJSONRPC(stringUtils.uni(command))
    except UnicodeEncodeError:
        data = xbmc.executeJSONRPC(stringUtils.asciis(command))
    return json.loads(data.decode('utf-8')).get('result', {})
Esempio n. 2
0
def sendJSON(command):
    data = ''
    try:
        data = xbmc.executeJSONRPC(stringUtils.uni(command))
    except UnicodeEncodeError:
        data = xbmc.executeJSONRPC(stringUtils.asciis(command))
    return data.decode('utf-8') #uni(data)
Esempio n. 3
0
def sendJSON(command):
    data = ''
    try:
        data = xbmc.executeJSONRPC(stringUtils.uni(command))
    except UnicodeEncodeError:
        data = xbmc.executeJSONRPC(stringUtils.asciis(command))
    return data.decode('utf-8') #uni(data)