add iterParts() method to Photo class

This commit is contained in:
blacktwin 2020-10-10 14:55:16 -04:00
parent f9f3535751
commit 717b274d82

View file

@ -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.