diff --git a/cps/comic.py b/cps/comic.py index d9f1796c..a25f9a51 100644 --- a/cps/comic.py +++ b/cps/comic.py @@ -52,17 +52,14 @@ except (ImportError, LookupError) as e: use_rarfile = False use_comic_meta = False -COVER_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.webp', '.bmp'] - +NO_JPEG_EXTENSIONS = ['.png', '.webp', '.bmp'] +COVER_EXTENSIONS = ['.png', '.webp', '.bmp', '.jpg', '.jpeg'] def _cover_processing(tmp_file_name, img, extension): tmp_cover_name = os.path.join(os.path.dirname(tmp_file_name), 'cover.jpg') if use_IM: # convert to jpg because calibre only supports jpg - cover_ext = COVER_EXTENSIONS - cover_ext.remove('.jpeg') - cover_ext.remove('.jpg') - if extension in cover_ext: + if extension in NO_JPEG_EXTENSIONS: with Image(filename=tmp_file_name) as imgc: imgc.format = 'jpeg' imgc.transform_colorspace('rgb') diff --git a/cps/editbooks.py b/cps/editbooks.py index 7d207ed3..a020b214 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -287,7 +287,7 @@ def delete_book(book_id, book_format, jsonResponse): def render_edit_book(book_id): calibre_db.update_title_sort(config) cc = calibre_db.session.query(db.Custom_Columns).filter(db.Custom_Columns.datatype.notin_(db.cc_exceptions)).all() - book = calibre_db.get_filtered_book(book_id) + book = calibre_db.get_filtered_book(book_id, allow_show_archived=True) if not book: flash(_(u"Error opening eBook. File does not exist or file is not accessible"), category="error") return redirect(url_for("web.index")) diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 4cbce657..7b5c881b 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
-

Start Time: 2020-12-08 13:56:36

+

Start Time: 2020-12-09 15:21:02

-

Stop Time: 2020-12-08 16:13:33

+

Stop Time: 2020-12-09 17:53:34

-

Duration: 1h 48 min

+

Duration: 1h 57 min

@@ -234,21 +234,75 @@ - - TestCli - 7 - 6 + + _ErrorHolder + 1 0 0 1 + 0 - Detail + Detail - + + +
tearDownClass (test_anonymous)
+ + +
+ ERROR +
+ + + + + + + + + + + TestCli + 7 + 3 + 2 + 1 + 1 + + Detail + + + + + +
TestCli - test_already_started
@@ -257,25 +311,73 @@ - +
TestCli - test_bind_to_single_interface
- PASS + +
+ FAIL +
+ + + + - +
TestCli - test_cli_SSL_files
- PASS + +
+ FAIL +
+ + + + - +
TestCli - test_cli_different_folder
@@ -284,28 +386,52 @@ - +
TestCli - test_cli_different_settings_database
- PASS + +
+ ERROR +
+ + + + - +
TestCli - test_cli_gdrive_location
- SKIP + SKIP
-