From 7b84f5497488b83458ec6e712914995d152e6404 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Mon, 29 Mar 2010 20:22:15 +0100 Subject: [PATCH] make greater use of the SessionProxy --- deluge/ui/web/js/deluge-all/details/DetailsTab.js | 2 +- deluge/ui/web/js/deluge-all/details/OptionsTab.js | 2 +- deluge/ui/web/js/deluge-all/details/PeersTab.js | 2 +- deluge/ui/web/js/deluge-all/details/StatusTab.js | 2 +- deluge/ui/web/json_api.py | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/details/DetailsTab.js b/deluge/ui/web/js/deluge-all/details/DetailsTab.js index dbb65404a..5c01a2ea3 100644 --- a/deluge/ui/web/js/deluge-all/details/DetailsTab.js +++ b/deluge/ui/web/js/deluge-all/details/DetailsTab.js @@ -85,7 +85,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, { }, update: function(torrentId) { - deluge.client.core.get_torrent_status(torrentId, Deluge.Keys.Details, { + deluge.client.web.get_torrent_status(torrentId, Deluge.Keys.Details, { success: this.onRequestComplete, scope: this, torrentId: torrentId diff --git a/deluge/ui/web/js/deluge-all/details/OptionsTab.js b/deluge/ui/web/js/deluge-all/details/OptionsTab.js index 9d64bac16..97b410553 100644 --- a/deluge/ui/web/js/deluge-all/details/OptionsTab.js +++ b/deluge/ui/web/js/deluge-all/details/OptionsTab.js @@ -368,7 +368,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, { this.torrentId = torrentId; this.optionsManager.changeId(torrentId); } - deluge.client.core.get_torrent_status(torrentId, Deluge.Keys.Options, { + deluge.client.web.get_torrent_status(torrentId, Deluge.Keys.Options, { success: this.onRequestComplete, scope: this }); diff --git a/deluge/ui/web/js/deluge-all/details/PeersTab.js b/deluge/ui/web/js/deluge-all/details/PeersTab.js index 2395e8e4e..16bd7e6da 100644 --- a/deluge/ui/web/js/deluge-all/details/PeersTab.js +++ b/deluge/ui/web/js/deluge-all/details/PeersTab.js @@ -110,7 +110,7 @@ }, update: function(torrentId) { - deluge.client.core.get_torrent_status(torrentId, Deluge.Keys.Peers, { + deluge.client.web.get_torrent_status(torrentId, Deluge.Keys.Peers, { success: this.onRequestComplete, scope: this }); diff --git a/deluge/ui/web/js/deluge-all/details/StatusTab.js b/deluge/ui/web/js/deluge-all/details/StatusTab.js index 85991a062..6992c430d 100644 --- a/deluge/ui/web/js/deluge-all/details/StatusTab.js +++ b/deluge/ui/web/js/deluge-all/details/StatusTab.js @@ -72,7 +72,7 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, { update: function(torrentId) { if (!this.fields) this.getFields(); - deluge.client.core.get_torrent_status(torrentId, Deluge.Keys.Status, { + deluge.client.web.get_torrent_status(torrentId, Deluge.Keys.Status, { success: this.onRequestComplete, scope: this }); diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index e250b728a..910a568f9 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -596,6 +596,7 @@ class WebApi(JSONComponent): file_tree.walk(walk) d.callback(file_tree.get_tree()) + @export def get_torrent_status(self, torrent_id, keys): return component.get("SessionProxy").get_torrent_status(torrent_id, keys)