From 9a08bcd2bc0a5280cbb293d1306b7c4e2ad6d792 Mon Sep 17 00:00:00 2001 From: mmonkey Date: Thu, 16 Sep 2021 23:20:11 -0500 Subject: [PATCH] Started addressing some PR comments --- cps/admin.py | 1 - cps/templates/book_cover.html | 3 ++- cps/updater.py | 2 +- cps/web.py | 26 ++++++++++++++------------ 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 32d66a6f..98535320 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -41,7 +41,6 @@ from sqlalchemy.exc import IntegrityError, OperationalError, InvalidRequestError from sqlalchemy.sql.expression import func, or_, text from . import constants, logger, helper, services, isoLanguages, fs -from .cli import filepicker from . import db, calibre_db, ub, web_server, get_locale, config, updater_thread, babel, gdriveutils from .helper import check_valid_domain, send_test_mail, reset_password, generate_password_hash, check_email, \ valid_email, check_username diff --git a/cps/templates/book_cover.html b/cps/templates/book_cover.html index c5281797..67e7c24b 100644 --- a/cps/templates/book_cover.html +++ b/cps/templates/book_cover.html @@ -1,5 +1,6 @@ -{% macro book_cover_image(book, thumbnails) -%} +{% macro book_cover_image(book, thumbnails, title) -%} {%- set book_title = book.title if book.title else book.name -%} + {%- set book_title = title if title else book_title -%} {% set srcset = thumbnails|get_book_thumbnail_srcset if thumbnails|length else '' %} {%- if srcset|length -%}