replace / with & in studio strings

This commit is contained in:
faush01 2015-03-18 16:05:21 +11:00
parent c6917f5bd3
commit 1b4a99bd78
2 changed files with 14 additions and 6 deletions

View File

@ -29,9 +29,9 @@ class Kodi_Monitor(xbmc.Monitor):
# and when the playcount is updated byt he sync it just sends the same data back to the server
# if you add this back in you will never be able to trigger a play status update while the sync is running
xbmc.log("Kodi_Monitor -> onNotification -> VideoLibrary.OnUpdate : " + str(data))
jsondata = json.loads(data)
if jsondata != None:
xbmc.log("Kodi_Monitor -> onNotification -> VideoLibrary.OnUpdate : " + str(data))
playcount = None
playcount = jsondata.get("playcount")
item = jsondata.get("item").get("id")

View File

@ -126,7 +126,12 @@ class WriteKodiDB():
changes = self.updatePropertyArray(KodiItem,"writer",people.get("Writer"),"movie")
changes = self.updatePropertyArray(KodiItem,"director",people.get("Director"),"movie")
changes = self.updatePropertyArray(KodiItem,"genre",MBitem.get("Genres"),"movie")
if(studios != None):
for x in range(0, len(studios)):
studios[x] = studios[x].replace("/", "&")
changes = self.updatePropertyArray(KodiItem,"studio",studios,"movie")
# FIXME --> ProductionLocations not returned by MB3 server !?
self.updatePropertyArray(KodiItem,"country",MBitem.get("ProductionLocations"),"movie")
@ -196,6 +201,10 @@ class WriteKodiDB():
changes = self.updatePropertyArray(KodiItem,"genre",MBitem.get("Genres"),"tvshow")
if(studios != None):
for x in range(0, len(studios)):
studios[x] = studios[x].replace("/", "&")
changes = self.updatePropertyArray(KodiItem,"studio",studios,"tvshow")
# FIXME --> ProductionLocations not returned by MB3 server !?
@ -350,7 +359,6 @@ class WriteKodiDB():
id = KodiItem['movieid']
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": { "movieid": %i, "%s": %s}, "id": 1 }'
pendingChanges = False
if propertyCollection != None:
currentvalues = set(KodiItem[propertyName])