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
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_anonymous.py", line 23, in tearDownClass + cls.stop_calibre_web() + File "/home/matthias/Entwicklung/calibre-web-test/test/helper_ui.py", line 372, in stop_calibre_web + element.click() + File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click + self._execute(Command.CLICK_ELEMENT) + File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute + return self._parent.execute(command, params) + File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute + self.error_handler.check_response(response) + File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response + raise exception_class(message, screen, stacktrace) +selenium.common.exceptions.ElementNotInteractableException: Message: Element+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_cli.py", line 262, in test_bind_to_single_interface + self.assertTrue(re.findall('Reached error page:\sabout:neterror\?e=connectionFailure', error)) +AssertionError: [] is not true+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_cli.py", line 226, in test_cli_SSL_files + self.driver.get("https://127.0.0.1:8083") +selenium.common.exceptions.WebDriverException: Message: Reached error page: about:neterror?e=netTimeout&u=https%3A//127.0.0.1%3A8083/&c=UTF-8&d=Der%20Server%20unter%20127.0.0.1%20braucht%20zu%20lange%2C%20um%20eine%20Antwort%20zu%20senden. + + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_cli.py", line 228, in test_cli_SSL_files + self.assertIsNone("Error", "HTTPS Connection could not established with key/cert file") +AssertionError: 'Error' is not None : HTTPS Connection could not established with key/cert file+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_cli.py", line 97, in test_cli_different_settings_database + self.fill_initial_config({'config_calibre_dir': TEST_DB}) + File "/home/matthias/Entwicklung/calibre-web-test/test/helper_ui.py", line 198, in fill_initial_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_calibre_dir"))) + File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 80, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message:+
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_cover_edit_books.py", line 92, in test_upload_jpg - self.assertTrue(self.check_element_on_page((By.ID, 'flash_alert')), "BMP file is not detected") -AssertionError: False is not true : BMP file is not detected-
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_ebook_convert_kepubify.py", line 157, in test_convert_only - self.assertEqual(len(ret), len(ret2), "Reconvert of book started") -AssertionError: 2 != 3 : Reconvert of book started-
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_ebook_convert_kepubify_gdrive.py", line 208, in test_convert_only - self.assertEqual(len(ret), len(ret2), "Reconvert of book started") -AssertionError: 2 != 3 : Reconvert of book started-
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_additional_books.py", line 89, in test_upload_metadata_cbt + self.assertEqual('Test 执 to', details['title']) +AssertionError: 'Test 执 to' != 'book' +- Test 执 to ++ book+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_books.py", line 885, in test_upload_book_cbt + self.assertEqual('8936', resp.headers['Content-Length']) +AssertionError: '8936' != '19501' +- 8936 ++ 19501+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_books.py", line 863, in test_upload_book_cbz + self.assertEqual('8936', resp.headers['Content-Length']) +AssertionError: '8936' != '19501' +- 8936 ++ 19501+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_books.py", line 706, in test_upload_cover_hdd + self.assertTrue(self.check_element_on_page((By.CLASS_NAME, "alert"))) +AssertionError: False is not true+
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 844, in test_watch_metadata - self.assertNotIn('series', book) -AssertionError: 'series' unexpectedly found in {'reader': ['epub'], 'title': 'testbook', 'author': ['John Döe'], 'rating': 0, 'languages': ['English'], 'identifier': [], 'cover': '/cover/5?edit=14db778b-76ee-4bdf-baac-371aa555331f', 'tag': [], 'publisher': ['Randomhäus'], 'comment': '\n', 'add_shelf': [], 'del_shelf': [], 'edit_enable': True, 'kindle': None, 'kindlebtn': None, 'download': ['EPUB (6.7 kB)'], 'read': False, 'archived': False, 'series_all': 'Book 1.0 of test', 'series_index': '1.0', 'series': 'test', 'cust_columns': []}+ File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 712, in test_upload_cover_hdd + self.assertTrue(self.check_element_on_page((By.CLASS_NAME, "alert"))) +AssertionError: False is not true
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_kobo_sync.py", line 565, in test_book_download - data = self.inital_sync() - File "/home/matthias/Entwicklung/calibre-web-test/test/test_kobo_sync.py", line 120, in inital_sync - self.assertEqual(data[0]['NewEntitlement']['BookMetadata']['DownloadUrls'][1]['Size'], 6720) -AssertionError: 8250 != 6720-
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_kobo_sync.py", line 261, in test_sync_changed_book - self.assertEqual(1, len(data)) -AssertionError: 1 != 0-
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen - httplib_response = self._make_request( - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request - six.raise_from(e, None) - File "-", line 3, in raise_from - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request - httplib_response = conn.getresponse() - File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse - response.begin() - File "/usr/lib/python3.8/http/client.py", line 307, in begin - version, status, reason = self._read_status() - File "/usr/lib/python3.8/http/client.py", line 276, in _read_status - raise RemoteDisconnected("Remote end closed connection without" -http.client.RemoteDisconnected: Remote end closed connection without response - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/adapters.py", line 439, in send - resp = conn.urlopen( - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen - retries = retries.increment( - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment - raise six.reraise(type(error), error, _stacktrace) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise - raise value.with_traceback(tb) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen - httplib_response = self._make_request( - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request - six.raise_from(e, None) - File " ", line 3, in raise_from - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request - httplib_response = conn.getresponse() - File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse - response.begin() - File "/usr/lib/python3.8/http/client.py", line 307, in begin - version, status, reason = self._read_status() - File "/usr/lib/python3.8/http/client.py", line 276, in _read_status - raise RemoteDisconnected("Remote end closed connection without" -urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_kobo_sync.py", line 539, in test_sync_reading_state - r = newSession.put(self.kobo_adress + '/v1/library/8f1b72c1-e9a4-4212-b538-8e4f4837d201/state', - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/sessions.py", line 602, in put - return self.request('PUT', url, data=data, **kwargs) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/sessions.py", line 542, in request - resp = self.send(prep, **send_kwargs) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/sessions.py", line 655, in send - r = adapter.send(request, **kwargs) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/adapters.py", line 498, in send - raise ConnectionError(err, request=request) -requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_kobo_sync.py", line 272, in test_sync_shelf - self.assertTrue(self.check_element_on_page((By.ID, "flash_success"))) -AssertionError: False is not true-
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen - httplib_response = self._make_request( - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request - six.raise_from(e, None) - File "-", line 3, in raise_from - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request - httplib_response = conn.getresponse() - File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse - response.begin() - File "/usr/lib/python3.8/http/client.py", line 307, in begin - version, status, reason = self._read_status() - File "/usr/lib/python3.8/http/client.py", line 276, in _read_status - raise RemoteDisconnected("Remote end closed connection without" -http.client.RemoteDisconnected: Remote end closed connection without response - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/adapters.py", line 439, in send - resp = conn.urlopen( - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen - retries = retries.increment( - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment - raise six.reraise(type(error), error, _stacktrace) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise - raise value.with_traceback(tb) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen - httplib_response = self._make_request( - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request - six.raise_from(e, None) - File " ", line 3, in raise_from - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request - httplib_response = conn.getresponse() - File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse - response.begin() - File "/usr/lib/python3.8/http/client.py", line 307, in begin - version, status, reason = self._read_status() - File "/usr/lib/python3.8/http/client.py", line 276, in _read_status - raise RemoteDisconnected("Remote end closed connection without" -urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_kobo_sync.py", line 223, in test_sync_unchanged - r = newSession.get(self.kobo_adress+'/v1/initialization', headers=TestKoboSync.header) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/sessions.py", line 555, in get - return self.request('GET', url, **kwargs) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/sessions.py", line 542, in request - resp = self.send(prep, **send_kwargs) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/sessions.py", line 655, in send - r = adapter.send(request, **kwargs) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/requests/adapters.py", line 498, in send - raise ConnectionError(err, request=request) -requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_kobo_sync.py", line 236, in test_sync_upload - self.fill_basic_config({'config_uploading':1}) - File "/home/matthias/Entwicklung/calibre-web-test/test/helper_ui.py", line 281, in fill_basic_config - cls.fill_initial_config(elements) - File "/home/matthias/Entwicklung/calibre-web-test/test/helper_ui.py", line 197, in fill_initial_config - WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_calibre_dir"))) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 80, in until - raise TimeoutException(message, screen, stacktrace) -selenium.common.exceptions.TimeoutException: Message:-
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_kobo_sync.py", line 49, in tearDownClass - cls.stop_calibre_web() - File "/home/matthias/Entwicklung/calibre-web-test/test/helper_ui.py", line 369, in stop_calibre_web - cls.driver.find_element_by_id('admin_stop').click() - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 360, in find_element_by_id - return self.find_element(by=By.ID, value=id_) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element - return self.execute(Command.FIND_ELEMENT, { - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute - self.error_handler.check_response(response) - File "/home/matthias/Entwicklung/calibre-web-test/test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response - raise exception_class(message, screen, stacktrace) -selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="admin_stop"]-
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_ldap.py", line 294, in test_LDAP_import_memberfield - self.assertTrue(self.check_element_on_page((By.ID, "flash_success"))) -AssertionError: False is not true-
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_reader.py", line 60, in test_txt_reader - self.assertTrue('hörte' in content.text, 'Encoding of textfile viewer is not respected properly') -AssertionError: False is not true : Encoding of textfile viewer is not respected properly-
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 936, in test_archive_books + self.assertTrue(self.check_element_on_page((By.ID, "book_title"))) +AssertionError: False is not true+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 887, in test_authors_max_settings + self.assertEqual(len(list_element[1][10]['author']), 4) +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 829, in test_hide_custom_column + self.edit_book(custom_content={u'Custom Bool 1 Ä': u'No', + File "/home/matthias/Entwicklung/calibre-web-test/test/helper_ui.py", line 1418, in edit_book + submit.click() +AttributeError: 'bool' object has no attribute 'click'+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 782, in test_link_column_to_read_status + self.edit_book(custom_content={u'Custom Bool 1 Ä': u'No'}) + File "/home/matthias/Entwicklung/calibre-web-test/test/helper_ui.py", line 1418, in edit_book + submit.click() +AttributeError: 'bool' object has no attribute 'click'+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 87, in test_random_books_available + list_element[0].click() +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 679, in test_restrict_columns + self.assertEqual(len(books[1]), 11) +AssertionError: 10 != 11+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 572, in test_restrict_tags + self.assertEqual(len(self.get_books_displayed()[1]), 7) +AssertionError: 6 != 7+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 482, in test_search_order + self.verify_order("search", order=order) + File "/home/matthias/Entwicklung/calibre-web-test/test/helper_ui.py", line 1132, in verify_order + self.assertEqual(book_id, expected_result, "Key sorting order wrong: " + key) +AssertionError: 9 != 12 : Key sorting order wrong: new+
Traceback (most recent call last): + File "/home/matthias/Entwicklung/calibre-web-test/test/test_visiblilitys.py", line 123, in test_user_visibility_sidebar + list_element[0].click() +IndexError: list index out of range+