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 4460a9f8..4bb96eb6 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 6d4b88ab..306989d6 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 bdc5e94b..cfeb4eee 100644 --- a/cps/templates/shelf.html +++ b/cps/templates/shelf.html @@ -19,7 +19,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 7c74c3a1..6c57915d 100644 --- a/cps/templates/user_edit.html +++ b/cps/templates/user_edit.html @@ -172,7 +172,7 @@ {% for entry in downloads %} {% endfor %} diff --git a/cps/web.py b/cps/web.py index 343d5097..8f406d3e 100644 --- a/cps/web.py +++ b/cps/web.py @@ -2079,10 +2079,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//") @@ -2104,10 +2105,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()