mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-25 13:10:17 +00:00
Allow blank sort direction
Some sort fields don't follow the `defaultDirection` if the sort direction is not specified (e.g. `year` returns `year:asc` instead of the default `year:desc`). Allow blank `sortDir` and let the server handle it.
This commit is contained in:
parent
4bd550c320
commit
176aa36729
1 changed files with 1 additions and 4 deletions
|
@ -921,10 +921,7 @@ class LibrarySection(PlexObject):
|
||||||
|
|
||||||
sortField = libtype + '.' + filterSort.key
|
sortField = libtype + '.' + filterSort.key
|
||||||
|
|
||||||
if not sortDir:
|
availableDirections = ['', 'asc', 'desc', 'nullsLast']
|
||||||
sortDir = filterSort.defaultDirection
|
|
||||||
|
|
||||||
availableDirections = ['asc', 'desc', 'nullsLast']
|
|
||||||
if sortDir not in availableDirections:
|
if sortDir not in availableDirections:
|
||||||
raise NotFound('Unknown sort direction "%s". '
|
raise NotFound('Unknown sort direction "%s". '
|
||||||
'Available sort directions: %s'
|
'Available sort directions: %s'
|
||||||
|
|
Loading…
Reference in a new issue