diff --git a/src/calibre/library/server/browse.py b/src/calibre/library/server/browse.py index 37f024c08d..485601a311 100644 --- a/src/calibre/library/server/browse.py +++ b/src/calibre/library/server/browse.py @@ -373,13 +373,18 @@ class BrowseServer(object): script='toplevel();', main=main) def browse_sort_categories(self, items, sort): - if sort not in ('rating', 'name', 'popularity'): - sort = 'name' - items.sort(key=lambda x: sort_key(getattr(x, 'sort', x.name))) + def keyg(x): + x = getattr(x, 'sort', x.name) + if isinstance(x, unicode): + return sort_key(x) + return x + if sort == 'popularity': items.sort(key=operator.attrgetter('count'), reverse=True) elif sort == 'rating': items.sort(key=operator.attrgetter('avg_rating'), reverse=True) + else: + items.sort(key=keyg) return sort def browse_category(self, category, sort): diff --git a/src/calibre/manual/conversion.rst b/src/calibre/manual/conversion.rst index fea20a3163..3a7ae16598 100644 --- a/src/calibre/manual/conversion.rst +++ b/src/calibre/manual/conversion.rst @@ -541,7 +541,9 @@ Use the options to remove headers and footers to mitigate this issue. If the hea removed from the text it can throw off the paragraph unwrapping. Some limitations of PDF input is complex, multi-column, and image based documents are not supported. -Extraction of vector images and tables from within the document is also not supported. +Extraction of vector images and tables from within the document is also not supported. Some PDFs use special glyphs to +represent double ll or doubfle ff or fi,etc. Conversion of these may or may not work depending on jusy how they are +represented internally in the PDF. Comic Book Collections ~~~~~~~~~~~~~~~~~~~~~~~~~