From fad6550ff17307f8c5289d1dcb5991575da69717 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 6 Nov 2023 16:35:39 +0100 Subject: [PATCH] Show "all" opds feed entries only if there is at least one entry --- cps/opds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/opds.py b/cps/opds.py index 4067712f..b13b0570 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -502,7 +502,7 @@ def render_element_index(database_column, linked_table, folder): entries = entries.join(linked_table).join(db.Books) entries = entries.filter(calibre_db.common_filters()).group_by(func.upper(func.substr(database_column, 1, 1))).all() elements = [] - if off == 0: + if off == 0 and entries: elements.append({'id': "00", 'name': _("All")}) shift = 1 for entry in entries[