Skip to content

Commit

Permalink
Show "all" opds feed entries only if there is at least one entry
Browse files Browse the repository at this point in the history
  • Loading branch information
OzzieIsaacs committed Nov 6, 2023
1 parent b2e4907 commit fad6550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cps/opds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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[
Expand Down

0 comments on commit fad6550

Please sign in to comment.