diff --git a/data/interfaces/default/recently_added.html b/data/interfaces/default/recently_added.html index fc51c8ab..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. @@ -42,7 +43,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')