diff --git a/cps/admin.py b/cps/admin.py index 0354ed2b..1862dda8 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -296,8 +296,6 @@ def _configuration_update_helper(): reboot_required |= _config_string("config_certfile") if config.config_certfile and not os.path.isfile(config.config_certfile): return _configuration_result('Certfile location is not valid, please enter correct path', gdriveError) - - _config_string("config_server_url") _config_checkbox_int("config_uploading") _config_checkbox_int("config_anonbrowse") @@ -595,7 +593,6 @@ def edit_user(user_id): content.default_language = to_save["default_language"] if "locale" in to_save and to_save["locale"]: content.locale = to_save["locale"] - if to_save["email"] and to_save["email"] != content.email: existing_email = ub.session.query(ub.User).filter(ub.User.email == to_save["email"].lower()) \ .first() diff --git a/cps/config_sql.py b/cps/config_sql.py index 8ea8b978..809e97d8 100644 --- a/cps/config_sql.py +++ b/cps/config_sql.py @@ -49,7 +49,6 @@ class _Settings(_Base): config_port = Column(Integer, default=constants.DEFAULT_PORT) config_certfile = Column(String) config_keyfile = Column(String) - config_server_url = Column(String, default='') config_calibre_web_title = Column(String, default=u'Calibre-Web') config_books_per_page = Column(Integer, default=60) diff --git a/cps/kobo.py b/cps/kobo.py index 8ccec9c9..db16fe9a 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -388,7 +388,7 @@ def HandleAuthRequest(): @kobo.route("/v1/initialization") def HandleInitRequest(): - resources = NATIVE_KOBO_RESOURCES(calibre_web_url=config.config_server_url) + resources = NATIVE_KOBO_RESOURCES(calibre_web_url=url_for("web.index", _external=True).strip("/")) response = make_response(jsonify({"Resources": resources})) response.headers["x-kobo-apitoken"] = "e30=" return response diff --git a/cps/templates/config_edit.html b/cps/templates/config_edit.html index b73ecd21..dd406d39 100644 --- a/cps/templates/config_edit.html +++ b/cps/templates/config_edit.html @@ -104,10 +104,6 @@ -