mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
update library.LibrarySection._cleanSearchSort method to pull sort keys from LibrarySection._sorts() instead of using hardcoded ALLOWED_SORT.
This commit is contained in:
parent
a665d6f3ee
commit
14c122c87b
1 changed files with 2 additions and 1 deletions
|
@ -699,7 +699,8 @@ class LibrarySection(PlexObject):
|
|||
def _cleanSearchSort(self, sort):
|
||||
sort = '%s:asc' % sort if ':' not in sort else sort
|
||||
scol, sdir = sort.lower().split(':')
|
||||
lookup = {s.lower(): s for s in self.ALLOWED_SORT}
|
||||
allowedSort = [sort.key for sort in self._sorts()]
|
||||
lookup = {s.lower(): s for s in allowedSort}
|
||||
if scol not in lookup:
|
||||
raise BadRequest('Unknown sort column: %s' % scol)
|
||||
if sdir not in ('asc', 'desc'):
|
||||
|
|
Loading…
Reference in a new issue