make greater use of the SessionProxy

This commit is contained in:
Damien Churchill 2010-03-29 20:22:15 +01:00
parent 4ca14d68c1
commit 7b84f54974
5 changed files with 5 additions and 4 deletions

View File

@ -85,7 +85,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
}, },
update: function(torrentId) { 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, success: this.onRequestComplete,
scope: this, scope: this,
torrentId: torrentId torrentId: torrentId

View File

@ -368,7 +368,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
this.torrentId = torrentId; this.torrentId = torrentId;
this.optionsManager.changeId(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, success: this.onRequestComplete,
scope: this scope: this
}); });

View File

@ -110,7 +110,7 @@
}, },
update: function(torrentId) { 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, success: this.onRequestComplete,
scope: this scope: this
}); });

View File

@ -72,7 +72,7 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
update: function(torrentId) { update: function(torrentId) {
if (!this.fields) this.getFields(); 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, success: this.onRequestComplete,
scope: this scope: this
}); });

View File

@ -596,6 +596,7 @@ class WebApi(JSONComponent):
file_tree.walk(walk) file_tree.walk(walk)
d.callback(file_tree.get_tree()) d.callback(file_tree.get_tree())
@export
def get_torrent_status(self, torrent_id, keys): def get_torrent_status(self, torrent_id, keys):
return component.get("SessionProxy").get_torrent_status(torrent_id, keys) return component.get("SessionProxy").get_torrent_status(torrent_id, keys)