From 5dc7e8c16bb53dbc74b22ad03cd0bb8ab74f466d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 10 Jul 2017 22:46:39 +0530 Subject: [PATCH] Server OPDS feeds: Fix incorrect count of authors reported when there are lowercased author names. Fixes #1703251 [Calibre OPDS server cannot show more than 30 authors at a time](https://bugs.launchpad.net/calibre/+bug/1703251) --- src/calibre/srv/opds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/opds.py b/src/calibre/srv/opds.py index eed260f4e3..35e3868666 100644 --- a/src/calibre/srv/opds.py +++ b/src/calibre/srv/opds.py @@ -453,7 +453,7 @@ def get_navcatalog(request_context, which, page_url, up_url, offset=0): category_groups = OrderedDict() for x in sorted(starts, key=sort_key): category_groups[x] = len([y for y in items if - getattr(y, 'sort', y.name).startswith(x)]) + getattr(y, 'sort', y.name).upper().startswith(x)]) items = [Group(x, y) for x, y in category_groups.items()] max_items = request_context.opts.max_opds_items offsets = Offsets(offset, max_items, len(items))