1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

Fixing remove data in webui

This commit is contained in:
Malcolm Jarvis 2009-03-18 00:47:25 +00:00
parent 50c9385ceb
commit 8056917945

View file

@ -152,17 +152,20 @@ TransmissionRemote.prototype =
},
removeTorrentsAndData: function( torrents ) {
var remote = this,
o = { };
o.method = 'torrent-remove';
o.arguments = { };
o.arguments['delete-local-data'] = true;
o.arguments.ids = [ ];
var o = {
method: 'torrent-remove',
arguments: {
'delete-local-data': true,
ids: [ ]
}
};
if( torrents != null )
for( var i=0, len=torrents.length; i<len; ++i )
o.arguments.ids.push( torrents[i].id() );
this.sendRequest( RPC._Root, $.toJSON(o), function( ) {
this.sendRequest( o, function( ) {
remote.loadTorrents();
}, "json" );
} );
},
verifyTorrents: function( torrents ) {
this.sendTorrentCommand( 'torrent-verify', torrents );