Fix: When removing one or more selected torrents without deleting their data, make sure to only send torrentIds, not full torrent objects, via RPC (#2040)
Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
This commit is contained in:
parent
a1c5a215bf
commit
c42e05b42f
|
@ -203,18 +203,10 @@ export class Remote {
|
|||
);
|
||||
}
|
||||
|
||||
removeTorrents(torrent_ids, callback, context) {
|
||||
this.sendTorrentActionRequests(
|
||||
'torrent-remove',
|
||||
torrent_ids,
|
||||
callback,
|
||||
context
|
||||
);
|
||||
}
|
||||
removeTorrentsAndData(torrents) {
|
||||
removeTorrents(torrents, trash) {
|
||||
const o = {
|
||||
arguments: {
|
||||
'delete-local-data': true,
|
||||
'delete-local-data': trash,
|
||||
ids: [],
|
||||
},
|
||||
method: 'torrent-remove',
|
||||
|
|
|
@ -40,11 +40,7 @@ export class RemoveDialog extends EventTarget {
|
|||
_onConfirm() {
|
||||
const { remote, torrents, trash } = this.options;
|
||||
if (torrents.length > 0) {
|
||||
if (trash) {
|
||||
remote.removeTorrentsAndData(torrents);
|
||||
} else {
|
||||
remote.removeTorrents(torrents);
|
||||
}
|
||||
remote.removeTorrents(torrents, trash);
|
||||
}
|
||||
|
||||
this.close();
|
||||
|
|
Loading…
Reference in New Issue