set private tracker torrents to force seed
This commit is contained in:
1 parent
860100c4de
commit
b4898bddfe
1 file changed
+29
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
QBT_URL="http://localhost:8080"
|
||||
TRACKERS="myanonamouse|leo-test|nordicq"
|
||||
|
||||
API_KEY="qbt_Fw6R39WuJVY7rdhv2IXIc5n8Yfhc"
|
||||
|
||||
for HASH in $(
|
||||
curl -s \
|
||||
-H "Authorization: Bearer $API_KEY" \
|
||||
"$QBT_URL/api/v2/torrents/info" \
|
||||
| jq -r '.[].hash'
|
||||
)
|
||||
do
|
||||
if curl -s \
|
||||
-H "Authorization: Bearer $API_KEY" \
|
||||
"$QBT_URL/api/v2/torrents/trackers?hash=$HASH" \
|
||||
| jq -r '.[].url' \
|
||||
| grep -Eq "$TRACKERS"
|
||||
then
|
||||
curl -s \
|
||||
-H "Authorization: Bearer $API_KEY" \
|
||||
--data "hashes=$HASH&value=true" \
|
||||
"$QBT_URL/api/v2/torrents/setForceStart" \
|
||||
>/dev/null
|
||||
|
||||
echo "Force Start: $HASH"
|
||||
fi
|
||||
done
|
||||
Reference in new issue
Block a user