From 6b63a1399ec8582593208974ebca6ad0077b78b2 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 8 Jun 2018 17:42:20 -0700 Subject: [PATCH] Add collection tag to raw newsletter data --- plexpy/pmsconnect.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 8810bdcb..6953ec65 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -483,6 +483,7 @@ class PmsConnect(object): actors = [] genres = [] labels = [] + collections = [] if m.getElementsByTagName('Director'): for director in m.getElementsByTagName('Director'): @@ -504,6 +505,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')) + recent_item = {'media_type': helpers.get_xml_attr(m, 'type'), 'section_id': helpers.get_xml_attr(m, 'librarySectionID'), 'library_name': helpers.get_xml_attr(m, 'librarySectionTitle'), @@ -541,6 +546,7 @@ class PmsConnect(object): 'actors': actors, 'genres': genres, 'labels': labels, + 'collections': collections, 'full_title': helpers.get_xml_attr(m, 'title'), 'child_count': helpers.get_xml_attr(m, 'childCount') }