Merge remote-tracking branch 'page_count/fix-series-list-view-sorts-by-name-instead-of-sort-field'

This commit is contained in:
Ozzie Isaacs
2026-03-07 10:24:58 +01:00
4 changed files with 16 additions and 10 deletions

View File

@@ -301,7 +301,6 @@ def get_matching_tags():
tag_dict = {'tags': []}
q = calibre_db.session.query(db.Books).filter(calibre_db.common_filters(True))
calibre_db.create_functions()
# calibre_db.session.connection().connection.connection.create_function("lower", 1, db.lcase)
author_input = request.args.get('authors') or ''
title_input = request.args.get('title') or ''
include_tag_inputs = request.args.getlist('include_tag') or ''
@@ -1026,7 +1025,7 @@ def series_list():
.count())
if no_series_count:
entries.append([db.Category(_("None"), "-1"), no_series_count])
entries = sorted(entries, key=lambda x: x[0].name.lower(), reverse=not order_no)
entries = sorted(entries, key=lambda x: (x[0].sort or x[0].name).lower(), reverse=not order_no)
return render_title_template('list.html',
entries=entries,
folder='web.books_list',