Skip to content

Recipes

Outcome: five jobs whole, each built only from operations the earlier chapters proved — assembled here, with the checks left in, so you can run them standing on the lab's evidence.

1. Carry a file to another machine, both of them yours

The lab's own story, generalised: on the machine that has the file, run qbittorrent-nox with a profile and add a torrent made from the file (chapters 3, 4, 6); the check makes it a seed. On the machine that wants it, add the same .torrent (carried over by any means — it is 372 bytes of map), then introduce the pair:

curl -s -b cookies.txt --data \
  'hashes=<info hash>&peers=<first-machine>:48188' \
  .../api/v2/torrents/addPeers

Hash the result at both ends (chapter 7's closing check) before deleting any original. On a home network this moves large files with automatic repair and resume, and no cloud in the middle.

2. Put a ceiling on a busy client

One call, from chapter 5:

curl -s -b cookies.txt --data-urlencode \
  'json={"dl_limit":2097152,"up_limit":524288}' \
  .../api/v2/app/setPreferences

(2 MiB/s down, 512 KiB/s up — bytes, not bits.) Verify against dlspeed / upspeed in torrents/info, and remember the limit is a ceiling: a slow swarm under a high ceiling is still a slow swarm.

3. Audit everything a client holds, in one pass

For each torrent, progress should be 1 and — for anything you care about — a recheck should end where it began (chapter 8). The summary read:

curl -s -b cookies.txt \
  http://127.0.0.1:18088/api/v2/torrents/info \
  | jq '.[] | {name, state, progress}'

Anything below 1 that you believed complete is a named problem now, not a suspicion.

4. Watch a feed for a series you follow

Chapter 10, pointed at a publisher instead of a lab: add the publisher's feed, write one rule with mustContain set to the series' exact title words, read rss/rules back to confirm affectedFeeds names your feed, and let the refresh interval do the rest. Add a category (chapter 9) in the rule's torrentParams so feed arrivals file themselves apart from hand-added torrents.

5. The polite seedbox on a spare machine

Compose the chapters: static binary in a folder of its own (chapter 3), its own profile, a password you chose (chapter 4), a save path on the big disk (chapter 5), an upload limit your household can live with (recipe 2), and categories per kind of thing (chapter 9). Restart it the same way every time:

./qbittorrent-nox --confirm-legal-notice \
  --profile=/srv/qbt --webui-port=18088 \
  --torrenting-port=48188

and shut it down through its own API (chapter 4) rather than by killing it — the profile is its memory, and a clean exit is how the memory stays true.