1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 16:24:02 +00:00

Fixing upload torrent by URL

This commit is contained in:
Malcolm Jarvis 2009-03-30 22:35:13 +00:00
parent aefd0f4df2
commit 3610272c4c

View file

@ -171,13 +171,18 @@ TransmissionRemote.prototype =
this.sendTorrentCommand( 'torrent-verify', torrents ); this.sendTorrentCommand( 'torrent-verify', torrents );
}, },
addTorrentByUrl: function( url, options ) { addTorrentByUrl: function( url, options ) {
this.sendRequest( RPC._Root, $.toJSON({ var remote = this;
var o = {
method: 'torrent-add', method: 'torrent-add',
arguments: { arguments: {
paused: (options.paused ? 'true' : 'false'), paused: (options.paused ? 'true' : 'false'),
filename: url filename: url
} }
}) ); };
this.sendRequest(o, function() {
remote.loadTorrents();
} );
}, },
savePrefs: function( args ) { savePrefs: function( args ) {
var remote = this; var remote = this;