soulsync/core/repair_jobs
BoulderBadgeDad 030d9bf9ff Quality Upgrade: best-in-class matching (direct track-ID tier, dedup-skip, duration guard)
Four refinements on top of the tiered matcher:

1. Direct source track-ID tier (new top tier): enrichment writes each source's own
   track ID into the file tags (spotify_track_id/deezer_track_id/itunes_track_id/...).
   If we have the active source's track ID, fetch that exact track by ID via
   get_track_details — zero search. Tiers are now: track-ID -> ISRC -> album->track
   -> artist+title. _read_file_ids reads ISRC + all per-source IDs in one tag read.

2. Skip already-proposed tracks: a re-run loads existing finding entity_ids for the
   job and skips those tracks before any API call (pending stays deduped, dismissed
   stays dismissed) — re-runs are cheap.

3. Wrong-version guard: the fuzzy tiers (album-search + track search) reject a
   candidate whose length differs from ours by >5s (live/edit/remix with same title).
   _load_tracks now selects t.duration; exact tiers (track-ID/ISRC/stored-album-ID)
   skip the guard.

4. Tighter album matching: same-title cuts in an album are disambiguated by closest
   duration when track_number doesn't decide it.

Findings record matched_via = track_id | isrc | album | search. 30 repair tests pass
(added track-ID tier, duration guard, dedup-skip, and unit coverage).
2026-06-13 13:34:48 -07:00
..
__init__.py
acoustid_scanner.py
album_completeness.py
album_tag_consistency.py
base.py
cache_evictor.py
canonical_version_resolve.py
dead_file_cleaner.py
discography_backfill.py
duplicate_detector.py
empty_folder_cleaner.py
expired_download_cleaner.py
fake_lossless_detector.py
library_reorganize.py
library_retag.py
live_commentary_cleaner.py
lossy_converter.py
mbid_mismatch_detector.py
metadata_gap_filler.py
missing_cover_art.py
missing_lyrics.py
orphan_file_detector.py
quality_upgrade.py Quality Upgrade: best-in-class matching (direct track-ID tier, dedup-skip, duration guard) 2026-06-13 13:34:48 -07:00
relocate.py
replaygain_filler.py
single_album_dedup.py
track_number_repair.py
unknown_artist_fixer.py