Пример #1
0
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', {})
Пример #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)
Пример #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)