From b4547c0bf0a1125f53894b2dbce386a36f35328c Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 19 Aug 2009 23:16:19 +0000 Subject: [PATCH] add a show_session_speed option add a get_config() method to the web api --- deluge/ui/web/json_api.py | 16 ++++++++++++++++ deluge/ui/web/server.py | 1 + 2 files changed, 17 insertions(+) diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index 5112f8c7e..6245ab9d8 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -693,3 +693,19 @@ class WebApi(JSONComponent): self.host_list.save() d.callback(True) return d + + @export + def get_config(self): + """ + Get the configuration dictionary for the web interface. + + :rtype: dictionary + :returns: the configuration + """ + + config = component.get("DelugeWeb").config.config.copy() + del config["sessions"] + del config["pwd_salt"] + del config["pwd_sha1"] + return config + \ No newline at end of file diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index a1290e26b..5b86ecb03 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -90,6 +90,7 @@ CONFIG_DEFAULTS = { "sidebar_show_zero": False, "sidebar_show_trackers": False, "show_keyword_search": False, + "show_session_speed": False, "show_sidebar": True, "cache_templates": False, "https": False,