diff --git a/cps/__init__.py b/cps/__init__.py index 6821d507..d68306de 100755 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -62,10 +62,10 @@ mimetypes.add_type('application/x-mobipocket-ebook', '.mobi') mimetypes.add_type('application/x-mobipocket-ebook', '.prc') mimetypes.add_type('application/vnd.amazon.ebook', '.azw') mimetypes.add_type('application/x-mobi8-ebook', '.azw3') -mimetypes.add_type('application/x-cbr', '.cbr') -mimetypes.add_type('application/x-cbz', '.cbz') -mimetypes.add_type('application/x-cbt', '.cbt') -mimetypes.add_type('application/x-cb7', '.cb7') +mimetypes.add_type('application/x-rar', '.cbr') +mimetypes.add_type('application/zip', '.cbz') +mimetypes.add_type('application/x-tar', '.cbt') +mimetypes.add_type('application/x-7z-compressed', '.cb7') mimetypes.add_type('image/vnd.djv', '.djv') mimetypes.add_type('image/vnd.djv', '.djvu') mimetypes.add_type('application/mpeg', '.mpeg') diff --git a/setup.cfg b/setup.cfg index ac832da9..570c66d1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -59,6 +59,7 @@ install_requires = advocate>=1.0.0,<1.1.0 Flask-Limiter>=2.3.0,<3.6.0 regex>=2022.3.2,<2024.2.25 + python-magic>=0.4.27,<0.5.0 [options.packages.find] diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 1fc3469c..34d29396 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
Start Time: 2024-05-11 18:39:24
+Start Time: 2024-06-23 19:26:37
Stop Time: 2024-05-12 01:48:22
+Stop Time: 2024-06-24 02:18:31
Duration: 5h 59 min
+Duration: 5h 39 min
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 476, in test_backup_change_custom_rating + self.assertEqual(custom["#value#"], None) +AssertionError: 7 != None+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 85, in test_cbz_comicinfo + self.check_element_on_page((By.ID, 'edit_cancel')).click() +AttributeError: 'bool' object has no attribute 'click'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 285, in test_change_upload_formats + self.assertTrue(self.check_element_on_page((By.ID, 'edit_cancel'))) +AssertionError: False is not true+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 385, in test_delete_book + self.edit_book(content={'bookAuthor': u'John Döe', 'book_title': u'testbook', 'languages': 'english'}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 1772, in edit_book + ele.send_keys(Keys.CONTROL, "a") +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 810, in test_delete_role + self.assertTrue(self.delete_book_format(12, 'FB2')) +AssertionError: False is not true+
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 246, in test_upload_metadata_cb7 - self.assertEqual('Test 执 to', details['title']) -AssertionError: 'Test 执 to' != 'book' -- Test 执 to -+ book+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 819, in test_title_sort + self.assertEqual(7, len(self.search(' book '))) +AssertionError: 7 != 6
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 106, in test_upload_cbz_coverformats + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 392, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 304, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 671, in test_upload_edit_role + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 392, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 304, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 235, in test_upload_metadata_cb7 + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 392, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 304, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 162, in test_upload_metadata_cbr + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 392, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 304, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 203, in test_upload_metadata_cbt + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 392, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 304, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 392, in test_writeonly_path + self.fill_basic_config({'config_rarfile_location': unrar_path(), "config_unicode_filename": 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 392, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 304, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 52, in tearDownClass + remove_dependency(cls.dependencys) + File "/home/ozzie/Development/calibre-web-test/test/helper_func.py", line 349, in remove_dependency + name = name.split('|')[2] +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_reader.py", line 53, in tearDownClass + cls.stop_calibre_web() + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 480, in stop_calibre_web + cls.driver.find_element(By.ID, 'admin_stop').click() + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 830, in find_element + return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute + self.error_handler.check_response(response) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response + raise exception_class(message, screen, stacktrace) +selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="admin_stop"] +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16+