Phase 3. Additive backbone for the export job: - mb_recording_cache table (IF NOT EXISTS) + core/exports/recording_mbid_cache.py: persistent (artist,title)->recording_mbid cache, mirrors album_mbid_cache (lazy DB, error-degrades to miss). The MusicBrainz tail is ~1 req/s, so a resolved MBID is remembered once and reused across every export/playlist. - core/exports/playlist_export.py: resolve_playlist_tracks(tracks, resolve_fn) — walks tracks, dedups repeated songs within a run (resolve once), builds the ordered pseudo-playlist, tallies live stats (resolved/unmatched/deduped/by_source). Pure (I/O injected via resolve_fn + progress callback), so dedup + accounting are unit-tested with no DB/network. 5 tests. No wiring into runtime yet; nothing existing touched except the additive table. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||