From 6682b1ced1764fcc408758520ff7e1f766f2a7c9 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 26 Apr 2020 21:00:29 +0200 Subject: [PATCH] Fix download of book covers with enabled pillow from url --- cps/editbooks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/editbooks.py b/cps/editbooks.py index 9a9331b2..d18faab5 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -457,10 +457,11 @@ def edit_book(book_id): if not error: if to_save["cover_url"]: - if helper.save_cover_from_url(to_save["cover_url"], book.path) is True: + result, error = helper.save_cover_from_url(to_save["cover_url"], book.path) + if result is True: book.has_cover = 1 else: - flash(_(u"Cover is not a jpg file, can't save"), category="error") + flash(error, category="error") if book.series_index != to_save["series_index"]: book.series_index = to_save["series_index"]