node-qbittorrent-api-v2 icon indicating copy to clipboard operation
node-qbittorrent-api-v2 copied to clipboard

tag function argument named hashed, likely should be hashes

Open gmillerd opened this issue 4 years ago • 1 comments

I believe this is a small typo

ReferenceError: hashed is not defined
    at addTags (/antmedia/bt/qbt/node_modules/qbittorrent-api-v2/src/qbt.js:1161:71)
    at Object.addTags (/antmedia/bt/qbt/node_modules/qbittorrent-api-v2/src/qbt.js:678:18)

https://github.com/TheFlow95/node-qbittorrent-api-v2/blob/6f4e527a653a115958fe2aaa0b05ffaa225dcfcc/src/qbt.js#L1160

 1161c1161
 <       await performRequest(options, cookie, '/torrents/addTags', { hashes: hashes, tags: encodeURI(tags) })
 ---
 >       await performRequest(options, cookie, '/torrents/addTags', { hashes: hashed, tags: encodeURI(tags) })
 1166c1166
 <       await performRequest(options, cookie, '/torrents/removeTags', { hashes: hashes, tags: encodeURI(tags) })
 ---
 >       await performRequest(options, cookie, '/torrents/removeTags', { hashes: hashed, tags: encodeURI(tags) })

gmillerd avatar Jan 16 '21 18:01 gmillerd

Hi @gmillerd, unfortunately I don't have time to actively work on this at the moment. However, if you want to go ahead and make a PR to fix this method, I would gladly review it.

flowbe avatar Feb 03 '22 12:02 flowbe