Closed kingp0dd closed 9 months ago
You can likely do it using xargs
linux command. You can see an example here: https://github.com/fedarovich/qbittorrent-cli/discussions/64
@kingp0dd
I assume you've already sorted this, but you through cron, use a bash script like this I just installed jq (apt-get install jq) to parse the json easily without having to awk it.
#!/bin/bash
jsonFilename=qbt-errored
# export torrent list as json
qbt torrent list -F json > $jsonFilename.json
# parse json file and find all torrents with "state": "errored"
hashes=$(jq -r '.[] | select(.state=="errored") | .hash' $jsonFilename.json)
# loop through each hash and pause the corresponding torrent
for hash in $hashes; do
qbt torrent pause $hash
done
rm -f $jsonFilename.json
Is there a way to resume multiple torrents at once? Goal is to resume all "errored" torrents through cron.
So far, I was able to get the "hash" of all errored torrents, but I found out that I can't pass multiple hashes to qbt torrent resume