soulsync/core/downloads
Broque Thomas 2fc08e199e Enforce duration tolerance for strict sources
Add duration tolerance logic and pre-download rejection for structured sources (tidal, qobuz, hifi, deezer_dl, amazon) when candidate duration deviates beyond allowed tolerance. Introduces helper functions _duration_tolerance_seconds and _duration_mismatch_exceeds_integrity_tolerance and uses resolve_duration_tolerance from core.imports.file_integrity. Log and skip candidates that would fail post-processing integrity checks to avoid wasted downloads. Update tests to include matching engine stub and new cases covering rejection and acceptance based on duration tolerance; also adjust imports and test fixtures.
2026-05-20 11:24:57 -07:00
..
__init__.py PR4a: lift sync history recording to core/downloads/history.py 2026-04-27 20:37:16 -07:00
cancel.py diag: log every cancel_download caller with a trigger label 2026-05-19 22:31:29 -07:00
candidates.py diag: log every cancel_download caller with a trigger label 2026-05-19 22:31:29 -07:00
cleanup.py PR4c: lift _automatic_wishlist_cleanup_after_db_update to core/downloads/cleanup.py 2026-04-27 22:23:41 -07:00
history.py PR4a: lift sync history recording to core/downloads/history.py 2026-04-27 20:37:16 -07:00
lifecycle.py fix(downloads): wait for post-processing result 2026-05-20 09:39:56 -07:00
master.py Honor manual library matches across source labels 2026-05-18 16:32:38 -07:00
monitor.py fix(downloads): wait for post-processing result 2026-05-20 09:39:56 -07:00
post_processing.py Cin-6: Rename soulseek_client global → download_orchestrator 2026-05-04 23:23:32 -07:00
staging.py Lift _try_staging_match to core/downloads/staging.py 2026-04-28 23:26:15 -07:00
status.py Harden quarantine approval flows 2026-05-18 08:37:11 -07:00
task_worker.py fix(amazon): wire amazon into all streaming-source guards 2026-05-16 10:24:13 -07:00
validation.py Enforce duration tolerance for strict sources 2026-05-20 11:24:57 -07:00
wishlist_failed.py Surface silent exceptions across remaining modules — ~70 sites 2026-05-07 10:28:58 -07:00