Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

LawssssCat/qbittorrent-web-api-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qbittorrent web-api: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)

jq tutorial: https://jqlang.github.io/jq/tutorial/

Usage

load functions

# env
: ${qbt_host:="http://127.0.0.1"}
: ${qbt_port:="8080"}
: ${qbt_username:="admin"}
: ${qbt_password:="adminadmin"}

# Source library of functions
source ../lib/qb.shlib
source ../lib/qb.web-api.shlib

call functions

e.g. fetch tracker from net and set it to app preference "add_trackers". —— add_trackers_set.sh

e.g. ban peers that look like they are from XunLei —— ban_peers_add.sh

e.g. clean banned peers —— ban_peers_clean.sh

set_app_preferences '{"banned_IPs":""}'

Test

$ cd ./test
$ ./test-example.sh
 · EXAMPLE_0: add_trackers_set.sh ..............................  SUCCESS
 · EXAMPLE_1: app_preferences_get.sh ...........................  SUCCESS
 · EXAMPLE_2: ban_peers_add.sh .................................  SUCCESS
 · EXAMPLE_3: ban_peers_clean.sh ...............................  SUCCESS
 · EXAMPLE_4: torrent_peers_get.sh .............................  SUCCESS
 · EXAMPLE_5: torrent_trackers_add.sh ..........................  SUCCESS
 · EXAMPLE_6: torrent_trackers_get.sh ..........................  SUCCESS
 · EXAMPLE_7: torrent_trackers_remove.sh .......................  SUCCESS
 · EXAMPLE_8: torrents_get.sh ..................................  SUCCESS

Alternate