Skip to content

Commit

Permalink
Fix multiple torrents action in Electron (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
6c65726f79 committed Jun 10, 2021
1 parent d96fe56 commit 12e4a77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/TransmissionRPC.ts
Expand Up @@ -382,11 +382,11 @@ class TRPC {
return result;
}

async torrentAction(action: string, torrentId: number|Array<number>, args: Record<string, any> = {}){
async torrentAction(action: string, torrentIds: Array<number>, args: Record<string, any> = {}){
if(action=="remove"){
this.invalidatePersitentData();
}
return this.rpcCall("torrent-"+action, Object.assign({ids:torrentId}, args))
return this.rpcCall("torrent-"+action, Object.assign({ids:Object.values(torrentIds)}, args))
}

async torrentAdd(args: Record<string, any> = {}){
Expand Down

0 comments on commit 12e4a77

Please sign in to comment.