From b80bfa52605e21574f4525af081b41436bb0fce9 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Mon, 29 Apr 2019 19:01:30 +0200 Subject: [PATCH] Improvement for #897 --- cps/web.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index b69f83c5..cdfd5f26 100644 --- a/cps/web.py +++ b/cps/web.py @@ -2168,7 +2168,7 @@ def read_book(book_id, book_format): flash(_(u"Error opening eBook. File does not exist or file is not accessible:"), category="error") return redirect(url_for("index")) - # check if book was downloaded before + # check if book has bookmark lbookmark = None if current_user.is_authenticated: lbookmark = ub.session.query(ub.Bookmark).filter(ub.and_(ub.Bookmark.user_id == int(current_user.id), @@ -2203,6 +2203,9 @@ def read_book(book_id, book_format): extension=fileext, title=_(u"Read a Book"), book=book) flash(_(u"Error opening eBook. File does not exist or file is not accessible."), category="error") return redirect(url_for("index"))''' + flash(_(u"Error opening eBook. Fileformat is not supported."), category="error") + return redirect(url_for("index")) + @app.route("/download//")