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:
parent
50c9385ceb
commit
8056917945
1 changed files with 10 additions and 7 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue