diff --git a/cps/admin.py b/cps/admin.py index 49bf309c..3450f2ed 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -544,13 +544,13 @@ def _configuration_logfile_helper(to_save, gdriveError): reboot_required |= _config_int(to_save, "config_log_level") reboot_required |= _config_string(to_save, "config_logfile") if not logger.is_valid_logfile(config.config_logfile): - return _configuration_result(_('Logfile Location is not Valid, Please Enter Correct Path'), gdriveError) + return reboot_required, _configuration_result(_('Logfile Location is not Valid, Please Enter Correct Path'), gdriveError) reboot_required |= _config_checkbox_int(to_save, "config_access_log") reboot_required |= _config_string(to_save, "config_access_logfile") if not logger.is_valid_logfile(config.config_access_logfile): - return _configuration_result(_('Access Logfile Location is not Valid, Please Enter Correct Path'), gdriveError) - return reboot_required + return reboot_required, _configuration_result(_('Access Logfile Location is not Valid, Please Enter Correct Path'), gdriveError) + return reboot_required, None def _configuration_ldap_helper(gdriveError, to_save): reboot_required = False @@ -646,7 +646,10 @@ def _configuration_update_helper(): #LDAP configurator, if config.config_login_type == constants.LOGIN_LDAP: - reboot_required |= _configuration_ldap_helper(to_save, gdriveError) + reboot, message = _configuration_ldap_helper(to_save, gdriveError) + if message: + return message + reboot_required |= reboot # Remote login configuration _config_checkbox(to_save, "config_remote_login") @@ -672,7 +675,10 @@ def _configuration_update_helper(): if config.config_login_type == constants.LOGIN_OAUTH: _configuration_oauth_helper(to_save) - reboot_required |= _configuration_logfile_helper(to_save, gdriveError) + reboot, message = _configuration_logfile_helper(to_save, gdriveError) + if message: + return message + reboot_required |= reboot # Rarfile Content configuration _config_string(to_save, "config_rarfile_location") unrar_status = helper.check_unrar(config.config_rarfile_location) diff --git a/cps/opds.py b/cps/opds.py index cd83709a..165d23ad 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -367,7 +367,11 @@ def feed_shelf(book_id): @requires_basic_auth_if_no_ano @download_required def opds_download_link(book_id, book_format): - return get_download_link(book_id, book_format.lower()) + if "Kobo" in request.headers.get('User-Agent'): + client = "kobo" + else: + client = "" + return get_download_link(book_id, book_format.lower(), client) @opds.route("/ajax/book//") diff --git a/test/Calibre-Web TestSummary.html b/test/Calibre-Web TestSummary.html index 1a9fb744..af7b6739 100755 --- a/test/Calibre-Web TestSummary.html +++ b/test/Calibre-Web TestSummary.html @@ -36,17 +36,17 @@
-

Start Time: 2020-05-10 13:45:56

+

Start Time: 2020-05-21 10:39:39

-

Stop Time: 2020-05-10 14:42:12

+

Stop Time: 2020-05-21 11:31:09

-

Duration: 47:37 min

+

Duration: 42:16 min

@@ -223,13 +223,13 @@ test_cli.test_cli + 7 6 - 5 0 0 1 - Detail + Detail @@ -246,7 +246,7 @@ -
test_cli_SSL_files
+
test_bind_to_single_interface
PASS @@ -255,7 +255,7 @@ -
test_cli_different_folder
+
test_cli_SSL_files
PASS @@ -263,6 +263,15 @@ + +
test_cli_different_folder
+ + PASS + + + + +
test_cli_different_settings_database
@@ -271,19 +280,19 @@ - +
test_cli_gdrive_location
- SKIP + SKIP
-