Wrapper around qBittorrent's Web API v2 to manage your torrents from Node. Documented and everything.
The Web API v2 applies for version 4.1+ of qBittorrent, for qBittorrent v3.2.0-v4.0.4 check the qbittorrent-api package.
npm install qbittorrent-api-v2
const api = require('qbittorrent-api-v2')
api.connect('http://localhost:8080', 'admin', 'your_password')
.then(qbt => {
qbt.torrents()
.then(torrents => {
console.log(torrents)
})
.catch(err => {
console.error(err)
})
})
.catch(err => {
console.error(err)
})
The module is fully self-documented so you will find all info in the code.
See qBittorrent's API documentation for more info.
connect(host, user, password)
This method returns a Promise resolving an object allowing to call the other methods of the API.
appVersion()
apiVersion()
buildInfo()
shutdown()
preferences()
TODO
defaultSavePath()
log(normal, info, warning, critical, lastKnownId)
peerLog(lastKnownId)
syncMainData(rid)
syncPeersData(hash, rid)
transferInfo()
speedLimitsMode()
toggleSpeedLimitsMode()
globalDownloadLimit()
setGlobalDownloadLimit(limit)
globalUploadLimit()
setGlobalUploadLimit(limit)
banPeers(peers)
torrents([filter], [category], [sort], [reverse], [limit], [offset], [hashes])
properties(hash)
trackers(hash)
webseeds(hash)
files(hash)
pieceStates(hash)
pieceHashes(hash)
pauseTorrents(hashes)
resumeTorrents(hashes)
deleteTorrents(hashes)
recheckTorrents(hashes)
reannounceTorrents(hashes)
editTrackers(hash, origUrl, newUrl)
removeTrackers(hash, urls)
addPeers(hashes, peers)
TODO
addTrackers(hash, urls)
increasePriority(hashes)
decreasePriority(hashes)
maxPriority(hashes)
minPriority(hashes)
setFilePriority(hash, id, priority)
downloadLimit(hashes)
setDownloadLimit(hashes, limit)
setShareLimit(hashes, ratioLimit, seedingTimeLimit)
uploadLimit(hashes)
setUploadLimit(hashes, limit)
setLocation(hashes, location)
rename(hash, name)
setCategory(hash, category)
categories()
createCategory(category, savePath)
editCategory(category, savePath)
removeCategories(categories)
addTags(hashes, tags)
removeTags(hashes, tags)
tags()
createTags(tags)
deleteTags(tags)
setAutoManagement(hashes, enable)
toggleSequentialDownload(hashes)
toggleFirstLastPiecePrio(hashes)
setForceStart(hashes, value)
setSuperSeeding(hashes, value)
renameFile(hash, id, name)
startSearch(pattern, plugins, category)
stopSearch(id)
searchStatus([id])
searchResults(id, [limit], [offset])
deleteSearch(id)
searchCategories([pluginName])
searchPlugins()
installPlugin(sources)
uninstallPlugin(names)
enablePlugin(names, enable)
updatePlugins()