#!/usr/bin/env python3
"""remove_qb.py — Part 8 teardown: the throwaway qBittorrent on 9201 removed THROUGH THE PRODUCT (stop, then remove). The
shared library folder media/torrents (older than this test) and the app's older backups stay: remove_hdd_data and
remove_backups are false. usage: SC=
TARGET=9201 python3 remove_qb.py"""
import sys, time
sys.path.insert(0, "/mnt/5_hdd/felhom.eu/git/felhom.eu/documentation/audits/catalog-sweep-2026-10-24/tools")
import box_walk as w
w.login()
print("stop:", w.ctl("POST", "/api/stacks/qbittorrent/stop")[0])
time.sleep(5)
c, d = w.ctl("POST", "/api/stacks/qbittorrent/remove", {"remove_hdd_data": False, "remove_backups": False})
print("remove:", c, str(d)[:160])