add _sorts method

This commit is contained in:
blacktwin 2020-06-30 09:19:53 -04:00
parent e5d79c7518
commit 4a49ca97b0

View file

@ -466,6 +466,14 @@ class LibrarySection(PlexObject):
key = '/library/sections/%s/filters' % self.key
return self.fetchItems(key, cls=Filter)
def _sorts(self, mediaType=None):
items = []
for data in self.listChoices('sorts', mediaType):
sort = Sort(server=self._server, data=data._data)
sort._initpath = data._initpath
items.append(sort)
return items
def agents(self):
""" Returns a list of available `:class:`~plexapi.media.Agent` for this library section.
"""