Add upload torrent by url to web interface

This commit is contained in:
Duncan Beevers
2009-01-20 03:41:19 +00:00
parent 69404a8c36
commit f00619bab7
4 changed files with 27 additions and 13 deletions

View File

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