From b4a8771232366c6a0ab12f71ed9aec0e2ec7cbb3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 7 Aug 2019 19:44:21 +0530 Subject: [PATCH] Content server: Fix OPDS feed for category based browsing listing restricted books, even though these books cannot be actually downloaded. Fixes #1839173 [opds feed shows other books with same tags when those books are not allowed.](https://bugs.launchpad.net/calibre/+bug/1839173) --- 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 b9de203d25..e3bcb240a3 100644 --- a/src/calibre/srv/opds.py +++ b/src/calibre/srv/opds.py @@ -566,7 +566,7 @@ def opds_category(ctx, rd, category, which): q = category if q == 'news': q = 'tags' - ids = rc.db.get_books_for_category(q, which) + ids = rc.db.get_books_for_category(q, which) & rc.allowed_book_ids() sort_by = 'series' if category == 'series' else 'title' return get_acquisition_feed(rc, ids, offset, page_url, up_url, 'calibre-category:'+category+':'+unicode_type(which), sort_by=sort_by)