From dd17b54bc112d3921f3c5f30a06c7a662d7e1805 Mon Sep 17 00:00:00 2001 From: Andre Freitas Date: Thu, 20 Oct 2022 16:52:14 +0100 Subject: [PATCH 1/2] fix: add missing `hashes` property --- src/qbt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qbt.js b/src/qbt.js index 7c14242..12c94fd 100644 --- a/src/qbt.js +++ b/src/qbt.js @@ -598,7 +598,7 @@ exports.connect = async (host, username, password) => { * @param {string} seedingTimeLimit - Max amount of time the torrent should be seeded. `-2` means the global limit should be used, `-1` means no limit */ setShareLimit: async (hashes, ratioLimit, seedingTimeLimit) => { - return await setShareLimit(options, cookie, ratioLimit, seedingTimeLimit) + return await setShareLimit(options, cookie, hashes, ratioLimit, seedingTimeLimit) }, /** * Get torrent upload limit From 1f82e26866f26e5b1f7f22f1c9a0cf77d4bb9c7e Mon Sep 17 00:00:00 2001 From: Andre Freitas Date: Thu, 20 Oct 2022 19:11:10 +0100 Subject: [PATCH 2/2] fix: wrong param `hash` should be `hashes` --- src/qbt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qbt.js b/src/qbt.js index 12c94fd..aa82513 100644 --- a/src/qbt.js +++ b/src/qbt.js @@ -1132,8 +1132,8 @@ async function rename(options, cookie, hash, name) { return } -async function setCategory(options, cookie, hash, category) { - await performRequest(options, cookie, '/torrents/setCategory', { hash: hash, category: encodeURI(category) }) +async function setCategory(options, cookie, hashes, category) { + await performRequest(options, cookie, '/torrents/setCategory', { hashes: hashes, category: encodeURI(category) }) return }