Add PMS collections to tv shows

This commit is contained in:
tomkat83 2016-03-01 16:28:48 +01:00
parent e8f1382916
commit 47ad159a5f
2 changed files with 4 additions and 2 deletions

View file

@ -1521,7 +1521,7 @@ class API():
def getCollections(self): def getCollections(self):
""" """
Returns a list of PMS collection tags Returns a list of PMS collection tags or an empty list
""" """
collections = [] collections = []
for child in self.item: for child in self.item:

View file

@ -963,6 +963,7 @@ class TVShows(Items):
mpaa = API.getMpaa() mpaa = API.getMpaa()
genre = API.joinList(genres) genre = API.joinList(genres)
studios = API.getStudios() studios = API.getStudios()
collections = API.getCollections()
try: try:
studio = studios[0] studio = studios[0]
except IndexError: except IndexError:
@ -1076,8 +1077,9 @@ class TVShows(Items):
artwork.addArtwork(allartworks, showid, "tvshow", kodicursor) artwork.addArtwork(allartworks, showid, "tvshow", kodicursor)
# Process studios # Process studios
kodi_db.addStudios(showid, studios, "tvshow") kodi_db.addStudios(showid, studios, "tvshow")
# Process tags: view, emby tags # Process tags: view, PMS collection tags
tags = [viewtag] tags = [viewtag]
tags.extend(collections)
kodi_db.addTags(showid, tags, "tvshow") kodi_db.addTags(showid, tags, "tvshow")
if force_episodes: if force_episodes: