mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
add iterParts() method to Photo class
This commit is contained in:
parent
f9f3535751
commit
717b274d82
1 changed files with 6 additions and 0 deletions
|
@ -137,6 +137,12 @@ class Photo(PlexPartialObject):
|
|||
else:
|
||||
raise BadRequest('Unable to get section for photo, can`t find librarySectionID')
|
||||
|
||||
def iterParts(self):
|
||||
""" Iterates over the parts of this media item. """
|
||||
for item in self.media:
|
||||
for part in item.parts:
|
||||
yield part
|
||||
|
||||
def sync(self, resolution, client=None, clientId=None, limit=None, title=None):
|
||||
""" Add current photo as sync item for specified device.
|
||||
See :func:`plexapi.myplex.MyPlexAccount.sync()` for possible exceptions.
|
||||
|
|
Loading…
Reference in a new issue