mirror of
https://github.com/soulis-1256/assemblrr.git
synced 2026-08-29 01:21:45 +00:00
Seerr's DELETE /api/v1/media/:id/file is title-scoped and would wipe every remaining season. For a TV request that is only a subset, the gateway now deletes those Sonarr episode files and unmonitors them, then drops the request. Movies and last remaining seasons still use the title-level cascade. media-purge --seasons and the inotify watcher match that: a season path never title-purges (other seasons may only be monitored). qB cleanup requires a season token, refuses multi-season and S01-03 packs, and uses the same title-boundary rules as title-level. *arr recycle bin is /data/media/.recycle with 7-day cleanup. Sonarr uncertainty (missing key, failed episodefile list, empty TV season list) returns 502 and leaves the request. The gateway mounts config/sonarr/ as a directory so first install cannot replace config.xml with a Docker-created directory.
2 KiB
2 KiB
Tests
Runtime hooks stay in scripts/. Tests live here.
./tests/run.sh # unit
./tests/run.sh compose # docker compose config
./tests/run.sh all # unit + compose + shellcheck (if installed)
make test
Live integration
Opt-in only — these mutate a real install:
ASSEMBLRR_ALLOW_LIVE_TEST=1 ./tests/run.sh integration
Or one suite:
ASSEMBLRR_ALLOW_LIVE_TEST=1 ./tests/integration/watchdog_stall.sh
ASSEMBLRR_ALLOW_LIVE_TEST=1 ./tests/integration/media_purge_e2e.sh
Install dir resolution: ASSEMBLRR_DIR, ASSEMBLRR_CONFIG, then ~/assemblrr.
| Script | What it does |
|---|---|
watchdog_stall.sh |
Stalls qBittorrent connections; checks vpn-watchdog |
media_purge_e2e.sh |
Full delete cascade for Big Buck Bunny (TMDB 10378) via Radarr, Seerr (file + request/gateway), and Jellyfin APIs |
media_purge_e2e
Requires a running stack with purge wiring (media-purge-watch up, seerr-gateway on 5055, Radarr “Media Purge” notification on).
- Creates a synthetic hardlinked title under
media/+torrents/and a local qB torrent (no indexer grab). - Radarr
DELETE /api/v3/movie/:id?deleteFiles=true→ CustomScript → qB cleanup. - Seerr
DELETE /api/v1/media/:id/file→ Radarr delete → same cascade. - Seerr
DELETE /api/v1/request/:idthrough seerr-gateway → movie/title purge or TV season-scoped purge + request gone (checksX-Assemblrr-Request-Delete-Purge). - Jellyfin
DELETE /Items/:id→ filesystem delete →media-purge-watch→ full purge. - Asserts Radarr row,
media/,torrents/, and qB torrent are all gone (other titles untouched).
Offline unit for the gateway (no Docker stack): ./tests/unit/test_seerr_gateway.sh or python3 scripts/seerr-gateway.py --self-test.
See also: docs/seerr-delete-request.md (behavior + how to retire when Seerr does this natively).
Optional env: API_HOST, QBIT_HOST (defaults 127.0.0.1 / 127.0.0.1:8081).