From 47ad159a5fabf9471aac0bf0f79e7abeb74d508c Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Tue, 1 Mar 2016 16:28:48 +0100 Subject: [PATCH] Add PMS collections to tv shows --- resources/lib/PlexAPI.py | 2 +- resources/lib/itemtypes.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 04face0a..75f38869 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1521,7 +1521,7 @@ class API(): def getCollections(self): """ - Returns a list of PMS collection tags + Returns a list of PMS collection tags or an empty list """ collections = [] for child in self.item: diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 243b88f0..a421c9ca 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -963,6 +963,7 @@ class TVShows(Items): mpaa = API.getMpaa() genre = API.joinList(genres) studios = API.getStudios() + collections = API.getCollections() try: studio = studios[0] except IndexError: @@ -1076,8 +1077,9 @@ class TVShows(Items): artwork.addArtwork(allartworks, showid, "tvshow", kodicursor) # Process studios kodi_db.addStudios(showid, studios, "tvshow") - # Process tags: view, emby tags + # Process tags: view, PMS collection tags tags = [viewtag] + tags.extend(collections) kodi_db.addTags(showid, tags, "tvshow") if force_episodes: