Feature request: optionally delete the TorBox task when a job is removed
Problem
When Sonarr/Radarr (or a user) removes a torrent through the qBittorrent/SABnzbd API, TorBoxarr deletes its local job record but leaves the corresponding task alive in the TorBox account. Over time this accumulates orphaned entries in TorBox — the *arr apps consider the download gone, but it still occupies the TorBox library/queue and has to be pruned manually.
Proposal
Add an opt-in flag, TORBOXARR_UPSTREAM_REMOVE (default false), that makes a job removal also issue a delete against the TorBox API for the associated remote_id.
- Enabled: removing a torrent in the *arr app cleans up both sides (local payload + TorBox task).
- Disabled (default): behavior is unchanged — local-only removal, TorBox content retained.
Design sketch
- A
DeleteTask(ctx, sourceType, remoteID) method on the TorBox Client interface, with an HTTP implementation calling the TorBox control endpoints (/api/torrents/controltorrent and /api/usenet/controlusenetdownload with {"operation":"delete", ...}).
- The remover worker checks the config flag; when set and a
remote_id exists, it calls DeleteTask before local cleanup.
- Retryable errors bubble up so the job is retried; non-retryable errors log a warning and proceed with local cleanup (removal is never blocked by an upstream failure).
- Log/state messages distinguish "upstream torbox task deleted" from "torbox content retained".
Why opt-in
Some users deliberately keep content in TorBox after the *arr app has grabbed it (re-use, seeding credit, manual re-import). A flag respects both workflows and keeps the change non-breaking for existing deployments.
I have a working implementation and would be happy to open a PR if this direction sounds good.
Feature request: optionally delete the TorBox task when a job is removed
Problem
When Sonarr/Radarr (or a user) removes a torrent through the qBittorrent/SABnzbd API, TorBoxarr deletes its local job record but leaves the corresponding task alive in the TorBox account. Over time this accumulates orphaned entries in TorBox — the *arr apps consider the download gone, but it still occupies the TorBox library/queue and has to be pruned manually.
Proposal
Add an opt-in flag,
TORBOXARR_UPSTREAM_REMOVE(defaultfalse), that makes a job removal also issue a delete against the TorBox API for the associatedremote_id.Design sketch
DeleteTask(ctx, sourceType, remoteID)method on the TorBoxClientinterface, with an HTTP implementation calling the TorBox control endpoints (/api/torrents/controltorrentand/api/usenet/controlusenetdownloadwith{"operation":"delete", ...}).remote_idexists, it callsDeleteTaskbefore local cleanup.Why opt-in
Some users deliberately keep content in TorBox after the *arr app has grabbed it (re-use, seeding credit, manual re-import). A flag respects both workflows and keeps the change non-breaking for existing deployments.
I have a working implementation and would be happy to open a PR if this direction sounds good.