diff --git a/cps/templates/author.html b/cps/templates/author.html index 14dd94ed..2ebe8c4e 100644 --- a/cps/templates/author.html +++ b/cps/templates/author.html @@ -29,7 +29,7 @@
{% if entry.has_cover %} - + {% else %} {% endif %} diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index 5ba021c1..c9871f1a 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -6,7 +6,7 @@
{% if book.has_cover %} - {{ book.title }} + {{ book.title }} {% else %} {{ book.title }} {% endif %} diff --git a/cps/templates/detail.html b/cps/templates/detail.html index a49670e6..f9e89cbb 100644 --- a/cps/templates/detail.html +++ b/cps/templates/detail.html @@ -5,7 +5,7 @@
{% if entry.has_cover %} - {{ entry.title }} + {{ entry.title }} {% else %} {{ entry.title }} {% endif %} diff --git a/cps/templates/discover.html b/cps/templates/discover.html index 13dacb43..e8e848e7 100644 --- a/cps/templates/discover.html +++ b/cps/templates/discover.html @@ -9,7 +9,7 @@ diff --git a/cps/templates/index.html b/cps/templates/index.html index 1df6e62e..4c2b6375 100755 --- a/cps/templates/index.html +++ b/cps/templates/index.html @@ -10,7 +10,7 @@
{% if entry.has_cover %} - {{ entry.title }} + {{ entry.title }} {% else %} {{ entry.title }} {% endif %} @@ -55,7 +55,7 @@
{% if entry.has_cover %} - {{ entry.title }} + {{ entry.title }} {% else %} {{ entry.title }} {% endif %} diff --git a/cps/templates/search.html b/cps/templates/search.html index 79bd1e98..d8fde51a 100644 --- a/cps/templates/search.html +++ b/cps/templates/search.html @@ -36,7 +36,7 @@ diff --git a/cps/templates/shelf.html b/cps/templates/shelf.html index a317c14b..f48889dd 100644 --- a/cps/templates/shelf.html +++ b/cps/templates/shelf.html @@ -16,7 +16,7 @@
{% if entry.has_cover %} - {{ entry.title }} + {{ entry.title }} {% else %} {{ entry.title }} {% endif %} diff --git a/cps/templates/user_edit.html b/cps/templates/user_edit.html index 92685464..79de265f 100644 --- a/cps/templates/user_edit.html +++ b/cps/templates/user_edit.html @@ -157,7 +157,7 @@ {% for entry in downloads %} {% endfor %} diff --git a/cps/web.py b/cps/web.py index 1859103c..a643913a 100644 --- a/cps/web.py +++ b/cps/web.py @@ -2027,10 +2027,11 @@ def advanced_search(): series=series, title=_(u"search"), cc=cc, page="advsearch") -@app.route("/cover/") +@app.route("/cover/") @login_required_if_no_ano -def get_cover(cover_path): - return helper.get_book_cover(cover_path) +def get_cover(book_id): + book = db.session.query(db.Books).filter(db.Books.id == book_id).first() + return helper.get_book_cover(book.path) @app.route("/show//") @@ -2052,10 +2053,10 @@ def serve_book(book_id, book_format): return send_from_directory(os.path.join(config.config_calibre_dir, book.path), data.name + "." + book_format) -@app.route("/opds/thumb_240_240/") -@app.route("/opds/cover_240_240/") -@app.route("/opds/cover_90_90/") -@app.route("/opds/cover/") +@app.route("/opds/thumb_240_240/") +@app.route("/opds/cover_240_240/") +@app.route("/opds/cover_90_90/") +@app.route("/opds/cover/") @requires_basic_auth_if_no_ano def feed_get_cover(book_id): book = db.session.query(db.Books).filter(db.Books.id == book_id).first()