From 80ec5d9b29865172ad47d28a028976af04b4abf4 Mon Sep 17 00:00:00 2001 From: faush01 Date: Wed, 1 Apr 2015 14:17:46 +1100 Subject: [PATCH] fix string encoding for json command data --- resources/lib/WriteKodiDB.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/WriteKodiDB.py b/resources/lib/WriteKodiDB.py index 28556af1..bb5e96e5 100644 --- a/resources/lib/WriteKodiDB.py +++ b/resources/lib/WriteKodiDB.py @@ -146,7 +146,7 @@ class WriteKodiDB(): jsoncommand = jsoncommand %(KodiItem['movieid'], paramString) utils.logMsg("executeJSONRPC : ", jsoncommand, level = 2) xbmc.sleep(sleepVal) - result = xbmc.executeJSONRPC(jsoncommand) + result = xbmc.executeJSONRPC(jsoncommand.encode("utf-8")) #add actors changes |= self.AddActorsToMedia(KodiItem,MBitem.get("People"), "movie") @@ -216,7 +216,7 @@ class WriteKodiDB(): jsoncommand = jsoncommand %(KodiItem['musicvideoid'], paramString) utils.logMsg("executeJSONRPC : ", jsoncommand, level = 2) xbmc.sleep(sleepVal) - result = xbmc.executeJSONRPC(jsoncommand) + result = xbmc.executeJSONRPC(jsoncommand.encode("utf-8")) CreateFiles().createSTRM(MBitem) CreateFiles().createNFO(MBitem) @@ -591,7 +591,7 @@ class WriteKodiDB(): #xbmc.sleep(sleepVal) utils.logMsg("MB3 Sync","updating property..." + str(propertyName)) utils.logMsg("MB3 Sync","kodi value:" + KodiItem[propertyName] + " MB value: " + propertyValue) - params.append("\"" + propertyName + "\": \"" + str(propertyValue) + "\"") + params.append("\"" + propertyName + "\": \"" + propertyValue + "\"") #xbmc.executeJSONRPC(jsoncommand_s %(id, propertyName, propertyValue.encode('utf-8'))) changes = True