soulsync/tests/downloads
Broque Thomas b5755d6307 Trust user manual picks past AcoustID verification (#701)
When a task failed AcoustID verification and got quarantined, opening
the candidates modal and manually picking a different file would just
re-quarantine it. The manual-pick path through
`_attempt_download_with_candidates` ran full post-processing with no
quarantine bypass — so if the alternate file disagreed with AcoustID's
stored metadata too (common for live versions, remasters, regional
title differences, fingerprint coverage gaps) the file landed right
back in quarantine. User got stuck in the loop.

The Approve button on quarantined rows already handles the "I want
this exact file" case via `_skip_quarantine_check='all'`. The
candidates modal handles the "I want a different file" case — same
user intent, opposite direction, but the bypass plumbing didn't carry
through.

`/api/downloads/task/<id>/download-candidate` already sets
`task['_user_manual_pick'] = True`. `attempt_download_with_candidates`
now reads that flag under tasks_lock alongside `used_sources` and,
when set, injects `_skip_quarantine_check='acoustid'` plus
`_user_manual_pick=True` into the stored `matched_downloads_context`
entry. The acoustid-only scope is deliberate: integrity + bit-depth
gates still run because those check the new file's actual condition
(corruption, sample rate) rather than its identity — only the
metadata-mismatch gate is the user-override case.

Auto-search picks (the normal task-worker path) leave the flag unset
and continue to run full AcoustID verification, preserving the
existing safety net for non-user-initiated downloads.

Tests:
- positive: manual-pick task → stored context has
  `_skip_quarantine_check='acoustid'` and `_user_manual_pick=True`
- negative: auto-search task → stored context has neither key,
  AcoustID still runs as before

Full suite 3976 pass.
2026-05-26 09:56:49 -07:00
..
__init__.py PR4a: lift sync history recording to core/downloads/history.py 2026-04-27 20:37:16 -07:00
test_background_download_worker.py Add 5 test additions JohnBaumb suggested 2026-05-05 13:04:18 -07:00
test_deezer_pinning.py Surface engine-not-wired errors + exclude soulseek from monitor aggregation 2026-05-05 12:20:51 -07:00
test_download_engine.py Add 5 test additions JohnBaumb suggested 2026-05-05 13:04:18 -07:00
test_download_orchestrator.py Fix Usenet settings reload without restart 2026-05-22 08:28:56 -07:00
test_downloads_cancel.py PR4b: lift cancel + clear download routes to core/downloads/cancel.py 2026-04-27 21:41:35 -07:00
test_downloads_candidates.py Trust user manual picks past AcoustID verification (#701) 2026-05-26 09:56:49 -07:00
test_downloads_cleanup.py PR4c: lift _automatic_wishlist_cleanup_after_db_update to core/downloads/cleanup.py 2026-04-27 22:23:41 -07:00
test_downloads_history.py PR4a: lift sync history recording to core/downloads/history.py 2026-04-27 20:37:16 -07:00
test_downloads_lifecycle.py Add torrent and usenet release staging support 2026-05-21 14:22:21 -07:00
test_downloads_master.py Harden album bundle fallback flow 2026-05-24 16:15:36 -07:00
test_downloads_post_processing.py Add torrent and usenet release staging support 2026-05-21 14:22:21 -07:00
test_downloads_staging.py Fix album-bundle staging match + wishlist provenance (#700, #698) 2026-05-26 07:12:49 -07:00
test_downloads_status.py Persist completed downloads in downloads view 2026-05-24 10:02:00 -07:00
test_downloads_task_worker.py Add Soulseek album bundle downloads 2026-05-23 15:08:21 -07:00
test_downloads_validation.py Add torrent and usenet release staging support 2026-05-21 14:22:21 -07:00
test_hifi_pinning.py Support legacy HiFi track manifests 2026-05-21 18:11:14 -07:00
test_lidarr_pinning.py A8: Pin LidarrDownloadClient download lifecycle behavior 2026-05-04 12:10:49 -07:00
test_qobuz_pinning.py Surface engine-not-wired errors + exclude soulseek from monitor aggregation 2026-05-05 12:20:51 -07:00
test_rate_limit_policy.py E1: Add RateLimitPolicy declaration mechanism 2026-05-04 14:38:20 -07:00
test_soulseek_pinning.py Add Soulseek album bundle downloads 2026-05-23 15:08:21 -07:00
test_soundcloud_pinning.py Surface engine-not-wired errors + exclude soulseek from monitor aggregation 2026-05-05 12:20:51 -07:00
test_tidal_pinning.py Handle non-JSON Tidal auth responses 2026-05-20 14:04:45 -07:00
test_youtube_pinning.py Surface engine-not-wired errors + exclude soulseek from monitor aggregation 2026-05-05 12:20:51 -07:00