soulsync/tests/blocklist
BoulderBadgeDad 8ee59c7453 Blocklist Phase 2b: gate manual downloads with a "download anyway?" confirm
Closes the last acquisition gap — user-initiated downloads. A blocklist isn't
a censor, so search + discography stay fully visible; instead the download
ACTION is gated, visibly and overridably:

- Download modal (start-missing-process): an up-front check — if the WHOLE
  album or artist being downloaded is blocklisted, return 409 {blocked:true}
  with the entity, before starting a batch. The modal shows "X is blocklisted
  — download anyway?" and re-POSTs with ignore_blocklist:true on confirm
  (threaded onto the batch so the Phase 2a per-track filter skips it).
  Scattered single-track bans still fall through to the 2a filter quietly.
- Manual /api/download (search-result download): source-file-centric, so it
  matches the blocked ARTIST by name; same 409 + confirm + override. search.js
  now sends artist/title so the guard has something to match.
- Precedence confirmed: force-download overrides "already owned", NOT a ban
  (the 2a filter runs on the force-expanded missing list).

Frontend: shared confirmBlockedDownload() helper; modal + search callers
handle the blocked response and retry with the override.

Tests: manual download blocked-by-name / unrelated-allowed / override-passes,
and the modal up-front 409 for a blocked album. 8 blocklist API tests pass.
2026-06-07 16:15:23 -07:00
..
__init__.py Blocklist Phase 1 (backend): artist/album/track bans enforced at the wishlist chokepoint 2026-06-07 15:18:25 -07:00
test_backfill.py Blocklist Phase 1 (backfill + API + modal): the Blocklist button on the watchlist page 2026-06-07 15:25:52 -07:00
test_blocklist_api.py Blocklist Phase 2b: gate manual downloads with a "download anyway?" confirm 2026-06-07 16:15:23 -07:00
test_blocklist_db.py Blocklist Phase 2a: gate the download queue (playlist sync / album / discography) 2026-06-07 15:49:59 -07:00
test_matching.py Blocklist Phase 1 (backend): artist/album/track bans enforced at the wishlist chokepoint 2026-06-07 15:18:25 -07:00