mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 03:33:08 +00:00
Override libtype for PhotoSection.all()
This commit is contained in:
parent
ce51fc70e9
commit
d5c29cc626
1 changed files with 8 additions and 4 deletions
|
@ -441,10 +441,7 @@ class LibrarySection(PlexObject):
|
|||
""" Returns a list of all items from this library section.
|
||||
See description of :func:`plexapi.library.LibrarySection.search()` for details about filtering / sorting.
|
||||
"""
|
||||
if isinstance(self, PhotoSection):
|
||||
libtype = 'photoalbum'
|
||||
elif libtype is None:
|
||||
libtype = self.TYPE
|
||||
libtype = libtype or self.TYPE
|
||||
return self.search(libtype=libtype, **kwargs)
|
||||
|
||||
def folders(self):
|
||||
|
@ -1053,6 +1050,13 @@ class PhotoSection(LibrarySection):
|
|||
CONTENT_TYPE = 'photo'
|
||||
METADATA_TYPE = 'photo'
|
||||
|
||||
def all(self, libtype=None, **kwargs):
|
||||
""" Returns a list of all items from this library section.
|
||||
See description of :func:`plexapi.library.LibrarySection.search()` for details about filtering / sorting.
|
||||
"""
|
||||
libtype = libtype or 'photoalbum'
|
||||
return self.search(libtype=libtype, **kwargs)
|
||||
|
||||
def collections(self, **kwargs):
|
||||
raise NotImplementedError('Collections are not available for a Photo library.')
|
||||
|
||||
|
|
Loading…
Reference in a new issue