fix: 400 when adding trackers (#674) @Larsluph

This commit is contained in:
Rémi Marseault 2023-02-22 21:42:09 +01:00 committed by GitHub
parent f4646e2e66
commit 9d31ff4360
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,7 +340,12 @@ export class QBitApi {
}
async addTorrentTrackers(hash: string, trackers: string): Promise<void> {
await this.torrentAction('addTrackers', [hash], { urls: trackers })
const params = {
hash,
urls: trackers
}
await this.execute(`/torrents/addTrackers`, params)
}
async removeTorrentTrackers(hash: string, trackers: string[]): Promise<void> {