1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-15 07:37:40 +00:00

Merge branch 'master' into Develop

# Conflicts:
#	cps/config_sql.py
#	cps/ub.py
#	cps/web.py
This commit is contained in:
Ozzieisaacs
2020-04-16 20:12:27 +02:00
24 changed files with 1322 additions and 646 deletions

View File

@@ -796,6 +796,7 @@ def fill_indexpage_with_archived_books(page, database, db_filter, order, allow_s
def get_typeahead(database, query, replace=('',''), tag_filter=true()):
query = query or ''
db.session.connection().connection.connection.create_function("lower", 1, lcase)
entries = db.session.query(database).filter(tag_filter).filter(func.lower(database.name).ilike("%" + query + "%")).all()
json_dumps = json.dumps([dict(name=r.name.replace(*replace)) for r in entries])