From 08bc365a7c8dd7f91ab5c5344f8a19927ba9acd9 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Tue, 25 Oct 2022 16:11:37 +0000 Subject: [PATCH] Add collections to get_children_metadata API data --- plexpy/pmsconnect.py | 6 ++++++ plexpy/webserve.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index e83a0a2d..9353b716 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -2442,6 +2442,7 @@ class PmsConnect(object): actors = [] genres = [] labels = [] + collections = [] if m.getElementsByTagName('Director'): for director in m.getElementsByTagName('Director'): @@ -2463,6 +2464,10 @@ class PmsConnect(object): for label in m.getElementsByTagName('Label'): labels.append(helpers.get_xml_attr(label, 'tag')) + if m.getElementsByTagName('Collection'): + for collection in m.getElementsByTagName('Collection'): + collections.append(helpers.get_xml_attr(collection, 'tag')) + media_type = helpers.get_xml_attr(m, 'type') if m.nodeName == 'Directory' and media_type == 'photo': media_type = 'photo_album' @@ -2506,6 +2511,7 @@ class PmsConnect(object): 'actors': actors, 'genres': genres, 'labels': labels, + 'collections': collections, 'full_title': helpers.get_xml_attr(m, 'title') } children_list.append(children_output) diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 3355d53e..040d61c7 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -4591,6 +4591,7 @@ class WebInterface(object): "audience_rating": "", "audience_rating_image": "", "banner": "", + "collections": [], "content_rating": "", "directors": [], "duration": "", @@ -5442,8 +5443,8 @@ class WebInterface(object): "tagline": "", "thumb": "/library/metadata/153037/thumb/1462175060", "title": "The Red Woman", - "user_rating": "9.0", "updated_at": "1462175060", + "user_rating": "9.0", "writers": [ "David Benioff", "D. B. Weiss"