From a8c93b87c78c576c4caf98f03ebe40d8336a03cc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 13 Jun 2010 11:49:45 -0600 Subject: [PATCH] Content server: Fix sorting of books by authors instead of author_sort in the main and mobile views --- src/calibre/library/server/content.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/library/server/content.py b/src/calibre/library/server/content.py index 4dd32eb284..0e04fdfdb5 100644 --- a/src/calibre/library/server/content.py +++ b/src/calibre/library/server/content.py @@ -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)