fix string encoding for json command data

This commit is contained in:
faush01 2015-04-01 14:17:46 +11:00
parent b8813b5bf7
commit 80ec5d9b29

View file

@ -146,7 +146,7 @@ class WriteKodiDB():
jsoncommand = jsoncommand %(KodiItem['movieid'], paramString) jsoncommand = jsoncommand %(KodiItem['movieid'], paramString)
utils.logMsg("executeJSONRPC : ", jsoncommand, level = 2) utils.logMsg("executeJSONRPC : ", jsoncommand, level = 2)
xbmc.sleep(sleepVal) xbmc.sleep(sleepVal)
result = xbmc.executeJSONRPC(jsoncommand) result = xbmc.executeJSONRPC(jsoncommand.encode("utf-8"))
#add actors #add actors
changes |= self.AddActorsToMedia(KodiItem,MBitem.get("People"), "movie") changes |= self.AddActorsToMedia(KodiItem,MBitem.get("People"), "movie")
@ -216,7 +216,7 @@ class WriteKodiDB():
jsoncommand = jsoncommand %(KodiItem['musicvideoid'], paramString) jsoncommand = jsoncommand %(KodiItem['musicvideoid'], paramString)
utils.logMsg("executeJSONRPC : ", jsoncommand, level = 2) utils.logMsg("executeJSONRPC : ", jsoncommand, level = 2)
xbmc.sleep(sleepVal) xbmc.sleep(sleepVal)
result = xbmc.executeJSONRPC(jsoncommand) result = xbmc.executeJSONRPC(jsoncommand.encode("utf-8"))
CreateFiles().createSTRM(MBitem) CreateFiles().createSTRM(MBitem)
CreateFiles().createNFO(MBitem) CreateFiles().createNFO(MBitem)
@ -591,7 +591,7 @@ class WriteKodiDB():
#xbmc.sleep(sleepVal) #xbmc.sleep(sleepVal)
utils.logMsg("MB3 Sync","updating property..." + str(propertyName)) utils.logMsg("MB3 Sync","updating property..." + str(propertyName))
utils.logMsg("MB3 Sync","kodi value:" + KodiItem[propertyName] + " MB value: " + propertyValue) 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'))) #xbmc.executeJSONRPC(jsoncommand_s %(id, propertyName, propertyValue.encode('utf-8')))
changes = True changes = True