mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +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 );
|
||||
},
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue