mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Content server: Fix sorting of books by authors instead of author_sort in the main and mobile views
This commit is contained in:
parent
9bb4875ae5
commit
a8c93b87c7
@ -60,6 +60,7 @@ class ContentServer(object):
|
||||
items.sort(cmp=self.seriescmp, reverse=not order)
|
||||
else:
|
||||
lookup = 'sort' if field == 'title' else field
|
||||
lookup = 'author_sort' if field == 'authors' else field
|
||||
field = self.db.FIELD_MAP[lookup]
|
||||
getter = operator.itemgetter(field)
|
||||
items.sort(cmp=lambda x, y: cmpf(getter(x), getter(y)), reverse=not order)
|
||||
|
Loading…
x
Reference in New Issue
Block a user