set a few more props on update

This commit is contained in:
im85288 2015-04-06 10:13:42 +01:00
parent 9eb3425021
commit 45d73bdb43
2 changed files with 19 additions and 2 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.emby"
name="Emby"
version="0.0.17"
version="0.0.18"
provider-name="Emby.media">
<requires>
<import addon="xbmc.python" version="2.1.0"/>

View file

@ -82,6 +82,7 @@ class WriteKodiDB():
if MBitem.get("CriticRating") != None:
self.getPropertyParam_Batched(KodiItem, "rating", int(MBitem.get("CriticRating"))/10, params)
self.getPropertyParam_Batched(KodiItem, "plot", MBitem.get("Overview"), params)
self.getPropertyParam_Batched(KodiItem, "plotoutline", MBitem.get("ShortOverview"), params)
self.getPropertyParam_Batched(KodiItem, "set", MBitem.get("TmdbCollectionName"), params)
self.getPropertyParam_Batched(KodiItem, "sorttitle", MBitem.get("SortName"), params)
@ -321,7 +322,10 @@ class WriteKodiDB():
if MBitem.get("CriticRating") != None:
changes |= self.updateProperty(KodiItem,"rating",int(MBitem.get("CriticRating"))/10,"tvshow")
changes |= self.updateProperty(KodiItem,"sorttitle",MBitem.get("SortName"),"tvshow")
changes |= self.updateProperty(KodiItem,"sorttitle",utils.convertEncoding(MBitem["SortName"]),"tvshow")
changes |= self.updateProperty(KodiItem,"title",utils.convertEncoding(MBitem["Name"]),"tvshow")
changes |= self.updateProperty(KodiItem,"plot",utils.convertEncoding(API().getOverview(MBitem)),"tvshow")
if MBitem.get("ProviderIds") != None:
if MBitem.get("ProviderIds").get("Imdb") != None:
@ -392,6 +396,19 @@ class WriteKodiDB():
if MBitem.get("CriticRating") != None:
changes |= self.updateProperty(KodiItem,"rating",int(MBitem.get("CriticRating"))/10,"episode")
if MBitem.get("ParentIndexNumber") != None:
season = int(MBitem.get("ParentIndexNumber"))
changes |= self.updateProperty(KodiItem,"season",season,"episode")
if MBitem.get("IndexNumber") != None:
episode = int(MBitem.get("IndexNumber"))
changes |= self.updateProperty(KodiItem,"episode",season,"episode")
plot = utils.convertEncoding(API().getOverview(MBitem))
changes |= self.updateProperty(KodiItem,"plot",plot,"episode")
title = utils.convertEncoding(MBitem["Name"])
changes |= self.updateProperty(KodiItem,"title",season,"episode")
changes |= self.updatePropertyArray(KodiItem,"writer",people.get("Writer"),"episode")