diff --git a/data/interfaces/default/recently_added.html b/data/interfaces/default/recently_added.html
index de1e650e..0c4bf98d 100644
--- a/data/interfaces/default/recently_added.html
+++ b/data/interfaces/default/recently_added.html
@@ -10,10 +10,10 @@ Variable names: data [array]
data[array_index] :: Usable parameters
== Global keys ==
-ratingKey Returns the unique identifier for the media item.
+rating_key Returns the unique identifier for the media item.
type Returns the type of media. Either 'movie' or 'season'.
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
-addedAt Returns the time when the media was added to the library.
+added_at Returns the time when the media was added to the library.
title Returns the name of the movie or season.
== Only if 'type' is 'movie' ==
@@ -30,7 +30,7 @@ DOCUMENTATION :: END
diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py
index dc7fc9d4..84e97483 100644
--- a/plexpy/pmsconnect.py
+++ b/plexpy/pmsconnect.py
@@ -208,15 +208,14 @@ class PmsConnect(object):
if recent_type == 'season':
recent_items = {'type': recent_type,
- 'ratingKey': helpers.get_xml_attr(item, 'ratingKey'),
+ 'rating_key': helpers.get_xml_attr(item, 'ratingKey'),
'title': helpers.get_xml_attr(item, 'title'),
'thumb': helpers.get_xml_attr(item, 'thumb'),
- 'addedAt': helpers.get_xml_attr(item, 'addedAt')
+ 'added_at': helpers.get_xml_attr(item, 'addedAt')
}
recents_list.append(recent_items)
else:
- recent_items = {}
- recents_list.append(recent_items)
+ pass
if a.getElementsByTagName('Video'):
recents_main = a.getElementsByTagName('Video')
for item in recents_main:
@@ -224,18 +223,17 @@ class PmsConnect(object):
if recent_type == 'movie':
recent_items = {'type': recent_type,
- 'ratingKey': helpers.get_xml_attr(item, 'ratingKey'),
+ 'rating_key': helpers.get_xml_attr(item, 'ratingKey'),
'title': helpers.get_xml_attr(item, 'title'),
'year': helpers.get_xml_attr(item, 'year'),
'thumb': helpers.get_xml_attr(item, 'thumb'),
- 'addedAt': helpers.get_xml_attr(item, 'addedAt')
+ 'added_at': helpers.get_xml_attr(item, 'addedAt')
}
recents_list.append(recent_items)
else:
- recent_items = {}
- recents_list.append(recent_items)
+ pass
- output = {'recently_added': sorted(recents_list, key=lambda k: k['addedAt'], reverse=True)}
+ output = {'recently_added': sorted(recents_list, key=lambda k: k['added_at'], reverse=True)}
return output
"""