create _locations method in library.LibrarySection to return the librar.Location objects

This commit is contained in:
blacktwin 2020-07-24 14:09:58 -04:00
parent 142448b4c8
commit 3c0fa04a12

View file

@ -657,6 +657,11 @@ class LibrarySection(PlexObject):
raise BadRequest('Unknown sort dir: %s' % sdir)
return '%s:%s' % (lookup[scol], sdir)
def _locations(self):
""" Returns a list of :class:`~plexapi.library.Location` objects
"""
return self.findItems(self._data, etag='Location')
def sync(self, policy, mediaSettings, client=None, clientId=None, title=None, sort=None, libtype=None,
**kwargs):
""" Add current library section as sync item for specified device.