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:
parent
aefd0f4df2
commit
3610272c4c
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue