From 3610272c4c8ce9df084a89fea7d8627082675d69 Mon Sep 17 00:00:00 2001 From: Malcolm Jarvis Date: Mon, 30 Mar 2009 22:35:13 +0000 Subject: [PATCH] Fixing upload torrent by URL --- web/javascript/transmission.remote.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/javascript/transmission.remote.js b/web/javascript/transmission.remote.js index 0b2b69777..411548b81 100644 --- a/web/javascript/transmission.remote.js +++ b/web/javascript/transmission.remote.js @@ -171,13 +171,18 @@ TransmissionRemote.prototype = this.sendTorrentCommand( 'torrent-verify', torrents ); }, addTorrentByUrl: function( url, options ) { - this.sendRequest( RPC._Root, $.toJSON({ + var remote = this; + var o = { method: 'torrent-add', arguments: { paused: (options.paused ? 'true' : 'false'), filename: url } - }) ); + }; + + this.sendRequest(o, function() { + remote.loadTorrents(); + } ); }, savePrefs: function( args ) { var remote = this;