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)
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ TestCli |
+ 7 |
+ 3 |
+ 2 |
+ 1 |
+ 1 |
+
+ Detail
+ |
+
+
+
+
+
TestCli - test_already_started
|
@@ -257,25 +311,73 @@
-
+
TestCli - test_bind_to_single_interface
|
- PASS |
+
+
+
+
+
+
+
+ |
-
+
TestCli - test_cli_SSL_files
|
- PASS |
+
+
+
+
+
+
+
+ |
-
+
TestCli - test_cli_different_folder
|
@@ -284,28 +386,52 @@
-
+
TestCli - test_cli_different_settings_database
|
- PASS |
+
+
+
+
+
+
+
+ |
-
+
TestCli - test_cli_gdrive_location
|
-
+
- |
-
+
TestDeleteDatabase - test_delete_books_in_database
|
@@ -405,13 +511,13 @@ AssertionError: False is not true : BMP file is not detected
0 |
0 |
- Detail
+ Detail
|
-
+
TestEbookConvertCalibre - test_convert_deactivate
|
@@ -420,7 +526,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_convert_email
|
@@ -429,7 +535,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_convert_failed_and_email
|
@@ -438,7 +544,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_convert_only
|
@@ -447,7 +553,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_convert_parameter
|
@@ -456,7 +562,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_convert_wrong_excecutable
|
@@ -465,7 +571,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_email_failed
|
@@ -474,7 +580,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_email_only
|
@@ -483,7 +589,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_kindle_send_not_configured
|
@@ -492,7 +598,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_ssl_smtp_setup_error
|
@@ -501,7 +607,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibre - test_starttls_smtp_setup_error
|
@@ -519,13 +625,13 @@ AssertionError: False is not true : BMP file is not detected
0 |
0 |
- Detail
+ Detail
|
-
+
TestEbookConvertCalibreGDrive - test_convert_email
|
@@ -534,7 +640,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibreGDrive - test_convert_failed_and_email
|
@@ -543,7 +649,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibreGDrive - test_convert_only
|
@@ -552,7 +658,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibreGDrive - test_convert_parameter
|
@@ -561,7 +667,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibreGDrive - test_email_failed
|
@@ -570,7 +676,7 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertCalibreGDrive - test_email_only
|
@@ -580,21 +686,21 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertKepubify |
3 |
- 2 |
- 1 |
+ 3 |
+ 0 |
0 |
0 |
- Detail
+ Detail
|
-
+
TestEbookConvertKepubify - test_convert_deactivate
|
@@ -603,36 +709,16 @@ AssertionError: False is not true : BMP file is not detected
-
+
TestEbookConvertKepubify - test_convert_only
|
-
-
-
-
-
-
-
- |
+ PASS |
-
+
TestEbookConvertKepubify - test_convert_wrong_excecutable
|
@@ -642,21 +728,21 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEbookConvertGDriveKepubify |
3 |
- 2 |
- 1 |
+ 3 |
+ 0 |
0 |
0 |
- Detail
+ Detail
|
-
+
TestEbookConvertGDriveKepubify - test_convert_deactivate
|
@@ -665,36 +751,16 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEbookConvertGDriveKepubify - test_convert_only
|
-
-
-
-
-
-
-
- |
+ PASS |
-
+
TestEbookConvertGDriveKepubify - test_convert_wrong_excecutable
|
@@ -704,21 +770,21 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks |
13 |
- 12 |
- 0 |
+ 11 |
+ 1 |
0 |
1 |
- Detail
+ Detail
|
-
+
TestEditAdditionalBooks - test_change_upload_formats
|
@@ -727,7 +793,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_delete_book
|
@@ -736,7 +802,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_delete_role
|
@@ -745,7 +811,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_edit_book_identifier
|
@@ -754,7 +820,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_edit_book_identifier_capital
|
@@ -763,7 +829,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_edit_book_identifier_standard
|
@@ -772,7 +838,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_edit_special_book_identifier
|
@@ -781,7 +847,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_title_sort
|
@@ -790,7 +856,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_upload_edit_role
|
@@ -799,7 +865,7 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_upload_metadata_cbr
|
@@ -808,28 +874,50 @@ AssertionError: 2 != 3 : Reconvert of book started
-
+
TestEditAdditionalBooks - test_upload_metadata_cbt
|
- PASS |
+
+
+
+
+
+
+
+ |
-
+
TestEditAdditionalBooks - test_writeonly_calibre_database
|
-
+
- |
-
+
TestCalibreHelper - test_author_sort
|
@@ -3545,7 +3581,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_author_sort_comma
|
@@ -3554,7 +3590,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_author_sort_junior
|
@@ -3563,7 +3599,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_author_sort_oneword
|
@@ -3572,7 +3608,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_author_sort_roman
|
@@ -3581,7 +3617,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_check_Limit_Length
|
@@ -3590,7 +3626,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_check_char_replacement
|
@@ -3599,7 +3635,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_check_chinese_Characters
|
@@ -3608,7 +3644,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_check_deg_eur_replacement
|
@@ -3617,7 +3653,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_check_doubleS
|
@@ -3626,7 +3662,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_check_finish_Dot
|
@@ -3635,7 +3671,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_check_high23
|
@@ -3644,7 +3680,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_check_umlauts
|
@@ -3653,7 +3689,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_random_password
|
@@ -3662,7 +3698,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_split_authors
|
@@ -3671,7 +3707,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
-
+
TestCalibreHelper - test_whitespaces
|
@@ -3682,10 +3718,10 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
Total |
- 292 |
- 272 |
- 9 |
- 4 |
+ 293 |
+ 268 |
+ 11 |
+ 7 |
7 |
|
@@ -3832,12 +3868,6 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
Basic |
-
- Pillow |
- 8.0.1 |
- TestCoverEditBooks |
-
-
google-api-python-client |
1.12.8 |
@@ -3863,14 +3893,8 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
- Pillow |
- 8.0.1 |
- TestEbookConvertCalibreGDrive |
-
-
-
- PyDrive |
- 1.3.1 |
+ PyDrive2 |
+ 1.7.0 |
TestEbookConvertCalibreGDrive |
@@ -3905,14 +3929,8 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
- Pillow |
- 8.0.1 |
- TestEbookConvertGDriveKepubify |
-
-
-
- PyDrive |
- 1.3.1 |
+ PyDrive2 |
+ 1.7.0 |
TestEbookConvertGDriveKepubify |
@@ -3934,12 +3952,6 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
TestEditAdditionalBooks |
-
- Pillow |
- 8.0.1 |
- TestEditAdditionalBooks |
-
-
rarfile |
4.0 |
@@ -3952,12 +3964,6 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
TestEditBooks |
-
- Pillow |
- 8.0.1 |
- TestEditBooks |
-
-
google-api-python-client |
1.12.8 |
@@ -3983,14 +3989,8 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
- Pillow |
- 8.0.1 |
- TestEditBooksOnGdrive |
-
-
-
- PyDrive |
- 1.3.1 |
+ PyDrive2 |
+ 1.7.0 |
TestEditBooksOnGdrive |
@@ -4019,8 +4019,8 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected
- PyDrive |
- 1.3.1 |
+ PyDrive2 |
+ 1.7.0 |
TestSetupGdrive |
@@ -4080,7 +4080,7 @@ AssertionError: False is not true : Encoding of textfile viewer is not respected