mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-26 10:00:37 +00:00
Show "all" opds feed entries only if there is at least one entry
This commit is contained in:
parent
b2e4907165
commit
fad6550ff1
@ -502,7 +502,7 @@ def render_element_index(database_column, linked_table, folder):
|
|||||||
entries = entries.join(linked_table).join(db.Books)
|
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()
|
entries = entries.filter(calibre_db.common_filters()).group_by(func.upper(func.substr(database_column, 1, 1))).all()
|
||||||
elements = []
|
elements = []
|
||||||
if off == 0:
|
if off == 0 and entries:
|
||||||
elements.append({'id': "00", 'name': _("All")})
|
elements.append({'id': "00", 'name': _("All")})
|
||||||
shift = 1
|
shift = 1
|
||||||
for entry in entries[
|
for entry in entries[
|
||||||
|
Loading…
Reference in New Issue
Block a user