diff --git a/addon.xml b/addon.xml index 4b882ade..fcf4965c 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/WriteKodiDB.py b/resources/lib/WriteKodiDB.py index 7a318cfd..15567cd4 100644 --- a/resources/lib/WriteKodiDB.py +++ b/resources/lib/WriteKodiDB.py @@ -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")