Fix matching sort key

This commit is contained in:
JonnyWong16 2021-05-16 11:30:03 -07:00
parent 1b8e476e96
commit 89e6d2d6f3
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -904,8 +904,7 @@ class LibrarySection(PlexObject):
libtype = _libtype or libtype or self.TYPE
try:
filterSort = next(f for f in self.listSorts(libtype)
if ',' not in f.key and f.key.split('.')[-1] == sortField)
filterSort = next(f for f in self.listSorts(libtype) if f.key == sortField)
except StopIteration:
availableSorts = [f.key for f in self.listSorts(libtype)]
raise NotFound('Unknown sort field "%s" for libtype "%s". '