soulsync/core/downloads
BoulderBadgeDad 2b17ed8451 #915: post-processing hydrates lean album context from the PRIMARY source (parity with Reorganize)
Root cause: the only album-context backfill in the download path (hydrate_download_metadata) goes
through spotify_client.get_track_details — Spotify-only. An iTunes/Deezer-primary user's download
kept a lean context (no release_date), so the path dropped $year and the date defaulted to
YYYY-01-01 — until they ran a Reorganize, which reads the full album from the PRIMARY source. That
asymmetry IS the bug.

Fix: when the context is lean and the primary source isn't Spotify, hydrate it from that source via
get_album_for_source — the exact path Reorganize/Enrich use. Verified the primary source returns the
real data (live iTunes get_album for the reporter's album: release_date 2024-04-17, not 2024-01-01).

backfill_album_context_from_source is a pure, injected-fn seam: 6 tests (hydrate, no-op when
complete / spotify-primary / sentinel-id, stays-lean on None, swallows source errors). 552 downloads
tests green.
2026-06-23 18:46:35 -07:00
..
__init__.py PR4a: lift sync history recording to core/downloads/history.py 2026-04-27 20:37:16 -07:00
album_bundle_dispatch.py Album bundle: fall back to per-track on an I/O error, don't hard-fail the batch 2026-06-01 13:29:05 -07:00
cancel.py diag: log every cancel_download caller with a trigger label 2026-05-19 22:31:29 -07:00
candidates.py #915: post-processing hydrates lean album context from the PRIMARY source (parity with Reorganize) 2026-06-23 18:46:35 -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
file_finder.py Fix: a '/' in a song title was treated as a path separator (#835) 2026-06-10 16:29:09 -07:00
history.py PR4a: lift sync history recording to core/downloads/history.py 2026-04-27 20:37:16 -07:00
lifecycle.py Playlists: reconcile rebuilds touched playlists from the LIBRARY, not task fields 2026-06-12 17:08:27 -07:00
master.py Playlists: all-owned trigger makes batch dict authoritative + logs when nothing rebuilt 2026-06-12 17:34:06 -07:00
monitor.py feat(downloads): Unverified review filter + visible retry progress 2026-06-11 01:28:31 +02:00
origin.py Download Origins: see (and delete) exactly what watchlist + playlist syncs downloaded 2026-06-07 00:15:31 -07:00
playlist_folder.py Fix #780: Deezer/non-Spotify organize-by-playlist resolved the wrong row 2026-06-03 20:41:04 -07:00
post_processing.py Add torrent and usenet release staging support 2026-05-21 14:22:21 -07:00
staging.py Staging match: log rejection reason on every silent-False exit 2026-05-27 14:12:55 -07:00
status.py resolve merge conflict in style.css 2026-06-11 18:21:04 +02:00
task_worker.py Post-merge #801 follow-ups: un-silence the retry engine's logs + register origin-history.js 2026-06-07 00:58:09 -07:00
track_detail.py Downloads: add per-track detail endpoint for the track-detail modal 2026-05-31 20:18:35 -07:00
track_link.py Manual download search: paste a Tidal/Qobuz track link to grab the exact version (#813) 2026-06-08 15:03:54 -07:00
track_metadata_backfill.py #915: post-processing hydrates lean album context from the PRIMARY source (parity with Reorganize) 2026-06-23 18:46:35 -07:00
validation.py Add torrent and usenet release staging support 2026-05-21 14:22:21 -07:00
wishlist_aggregator.py Wishlist modal: surface most-advanced live phase, not least-complete 2026-05-26 22:35:53 -07:00
wishlist_failed.py Fix album-bundle staging match + wishlist provenance (#700, #698) 2026-05-26 07:12:49 -07:00