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 # 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 # 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) jsondata = json.loads(data)
if jsondata != None: if jsondata != None:
xbmc.log("Kodi_Monitor -> onNotification -> VideoLibrary.OnUpdate : " + str(data))
playcount = None playcount = None
playcount = jsondata.get("playcount") playcount = jsondata.get("playcount")
item = jsondata.get("item").get("id") 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,"writer",people.get("Writer"),"movie")
changes = self.updatePropertyArray(KodiItem,"director",people.get("Director"),"movie") changes = self.updatePropertyArray(KodiItem,"director",people.get("Director"),"movie")
changes = self.updatePropertyArray(KodiItem,"genre",MBitem.get("Genres"),"movie") changes = self.updatePropertyArray(KodiItem,"genre",MBitem.get("Genres"),"movie")
changes = self.updatePropertyArray(KodiItem,"studio",studios,"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 !? # FIXME --> ProductionLocations not returned by MB3 server !?
self.updatePropertyArray(KodiItem,"country",MBitem.get("ProductionLocations"),"movie") self.updatePropertyArray(KodiItem,"country",MBitem.get("ProductionLocations"),"movie")
@ -196,7 +201,11 @@ class WriteKodiDB():
changes = self.updatePropertyArray(KodiItem,"genre",MBitem.get("Genres"),"tvshow") changes = self.updatePropertyArray(KodiItem,"genre",MBitem.get("Genres"),"tvshow")
changes = self.updatePropertyArray(KodiItem,"studio",studios,"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 !? # FIXME --> ProductionLocations not returned by MB3 server !?
changes = self.updatePropertyArray(KodiItem,"country",MBitem.get("ProductionLocations"),"tvshow") changes = self.updatePropertyArray(KodiItem,"country",MBitem.get("ProductionLocations"),"tvshow")
@ -350,7 +359,6 @@ class WriteKodiDB():
id = KodiItem['movieid'] id = KodiItem['movieid']
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": { "movieid": %i, "%s": %s}, "id": 1 }' jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": { "movieid": %i, "%s": %s}, "id": 1 }'
pendingChanges = False pendingChanges = False
if propertyCollection != None: if propertyCollection != None:
currentvalues = set(KodiItem[propertyName]) currentvalues = set(KodiItem[propertyName])