Add lastRatedAt to Audio and Video

This commit is contained in:
JonnyWong16 2021-05-15 22:38:35 -07:00
parent 41997d1152
commit d6cd71c971
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 2 additions and 0 deletions

View file

@ -51,6 +51,7 @@ class Audio(PlexPartialObject):
self.guid = data.attrib.get('guid')
self.index = utils.cast(int, data.attrib.get('index'))
self.key = data.attrib.get('key', '')
self.lastRatedAt = utils.toDatetime(data.attrib.get('lastRatedAt'))
self.lastViewedAt = utils.toDatetime(data.attrib.get('lastViewedAt'))
self.librarySectionID = utils.cast(int, data.attrib.get('librarySectionID'))
self.librarySectionKey = data.attrib.get('librarySectionKey')

View file

@ -47,6 +47,7 @@ class Video(PlexPartialObject):
self.fields = self.findItems(data, media.Field)
self.guid = data.attrib.get('guid')
self.key = data.attrib.get('key', '')
self.lastRatedAt = utils.toDatetime(data.attrib.get('lastRatedAt'))
self.lastViewedAt = utils.toDatetime(data.attrib.get('lastViewedAt'))
self.librarySectionID = utils.cast(int, data.attrib.get('librarySectionID'))
self.librarySectionKey = data.attrib.get('librarySectionKey')