mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 05:01:14 -07:00
Update plexapi.video.Clip and plexapi.photo.Photoalbum
This commit is contained in:
parent
6e41b7ef3d
commit
36f877c7ff
2 changed files with 13 additions and 4 deletions
|
@ -38,7 +38,7 @@ class Photoalbum(PlexPartialObject):
|
|||
self.composite = data.attrib.get('composite')
|
||||
self.guid = data.attrib.get('guid')
|
||||
self.index = utils.cast(int, data.attrib.get('index'))
|
||||
self.key = data.attrib.get('key')
|
||||
self.key = data.attrib.get('key', '').replace('/children', '')
|
||||
self.librarySectionID = data.attrib.get('librarySectionID')
|
||||
self.librarySectionKey = data.attrib.get('librarySectionKey')
|
||||
self.librarySectionTitle = data.attrib.get('librarySectionTitle')
|
||||
|
@ -75,6 +75,11 @@ class Photoalbum(PlexPartialObject):
|
|||
return photo
|
||||
raise NotFound('Unable to find photo: %s' % title)
|
||||
|
||||
def clips(self, **kwargs):
|
||||
""" Returns a list of :class:`~plexapi.video.Clip` objects in this album. """
|
||||
key = '/library/metadata/%s/children' % self.ratingKey
|
||||
return self.fetchItems(key, etag='Video', **kwargs)
|
||||
|
||||
|
||||
@utils.registerPlexObject
|
||||
class Photo(PlexPartialObject):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue