mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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)
This commit is contained in:
parent
bf8059aeb0
commit
b4a8771232
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user