From cbec1e776875b29f0c9303ebf21d01f6e8b0601e Mon Sep 17 00:00:00 2001 From: James Royal Date: Sat, 15 Aug 2015 13:28:32 -0500 Subject: [PATCH 1/2] Recently added TV Shows display title of the show --- data/interfaces/default/recently_added.html | 4 +++- plexpy/pmsconnect.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data/interfaces/default/recently_added.html b/data/interfaces/default/recently_added.html index fc51c8ab..a06d7b39 100644 --- a/data/interfaces/default/recently_added.html +++ b/data/interfaces/default/recently_added.html @@ -42,7 +42,9 @@ DOCUMENTATION :: END % endif
- % if item['type'] == 'season' or item['type'] == 'album': + % if item['type'] == 'season': +

${item['parent_title']} - ${item['title']}

+ % elif item['type'] == 'album':

${item['title']}

% elif item['type'] == 'movie':

${item['title']} (${item['year']})

diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 3e360b7f..c7f794f4 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -218,6 +218,7 @@ class PmsConnect(object): recent_items = {'type': recent_type, 'rating_key': helpers.get_xml_attr(item, 'ratingKey'), 'title': helpers.get_xml_attr(item, 'title'), + 'parent_title': helpers.get_xml_attr(item, 'parentTitle'), 'thumb': helpers.get_xml_attr(item, 'thumb'), 'added_at': helpers.get_xml_attr(item, 'addedAt') } @@ -232,6 +233,7 @@ class PmsConnect(object): recent_items = {'type': recent_type, 'rating_key': helpers.get_xml_attr(item, 'ratingKey'), 'title': helpers.get_xml_attr(item, 'title'), + 'parent_title': helpers.get_xml_attr(item, 'parentTitle'), 'year': helpers.get_xml_attr(item, 'year'), 'thumb': helpers.get_xml_attr(item, 'thumb'), 'added_at': helpers.get_xml_attr(item, 'addedAt') From 5826a823a8da682c001748c6ac628fcc0f2648fc Mon Sep 17 00:00:00 2001 From: James Royal Date: Sat, 15 Aug 2015 13:52:50 -0500 Subject: [PATCH 2/2] Add parent_title to the docs of recently_added.html --- data/interfaces/default/recently_added.html | 1 + 1 file changed, 1 insertion(+) diff --git a/data/interfaces/default/recently_added.html b/data/interfaces/default/recently_added.html index a06d7b39..af986e44 100644 --- a/data/interfaces/default/recently_added.html +++ b/data/interfaces/default/recently_added.html @@ -15,6 +15,7 @@ type Returns the type of media. Either 'movie' or 'season'. thumb Returns the location of the item's thumbnail. Use with pms_image_proxy. added_at Returns the time when the media was added to the library. title Returns the name of the movie or season. +parent_title Returns the name of the TV Show a season belongs too. == Only if 'type' is 'movie' == year Returns the movie release year.