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 Quality Upgrade Finder: new findings-based repair job (replaces auto-acting Quality Scanner) 2026-06-13 11:51:43 -07:00
acoustid_scanner.py CI: silence S110 on three intentional best-effort swallows (unblocks dev build) 2026-06-11 16:00:07 -07:00
album_completeness.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
album_tag_consistency.py Surface silent exceptions in workers + repair jobs — ~30 sites 2026-05-07 10:27:24 -07:00
base.py Repair settings: dropdown for fixed-choice settings (canonical source_selection) 2026-06-02 15:33:13 -07:00
cache_evictor.py Metadata cache: hard LRU row cap to stop unbounded growth (7.6GB incident) 2026-05-30 23:22:05 -07:00
canonical_version_resolve.py Canonical: fix ruff lint (B023 loop-bound lambda, S110 bare except-pass) 2026-06-02 15:42:14 -07:00
dead_file_cleaner.py Dead File Cleaner: don't flag a whole library when paths just aren't reachable (#828) 2026-06-09 13:12:50 -07:00
discography_backfill.py Surface silent exceptions in workers + repair jobs — ~30 sites 2026-05-07 10:27:24 -07:00
duplicate_detector.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
empty_folder_cleaner.py Add Empty Folder Cleaner library-maintenance job (corruption's request) 2026-06-11 22:11:26 -07:00
expired_download_cleaner.py Expired Cleaner: set auto_fix=True so the Dry Run badge shows (was mislabeled 'Scan Only') 2026-06-07 22:24:59 -07:00
fake_lossless_detector.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
library_reorganize.py #862: Library Reorganize falls back to tag-mode when an album has no source ID (media-server libs now actually reorganize) 2026-06-12 20:05:50 -07:00
library_retag.py Lyrics retag: fetch query from a read-only lyrics_meta, never db_data (no tag pollution) 2026-06-07 19:42:30 -07:00
live_commentary_cleaner.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
lossy_converter.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
mbid_mismatch_detector.py Surface silent exceptions in workers + repair jobs — ~30 sites 2026-05-07 10:27:24 -07:00
metadata_gap_filler.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
missing_cover_art.py Cover Art Filler: scan falls back to the raw file path when mapping fails (Sokhi #fix) 2026-06-08 17:32:38 -07:00
missing_lyrics.py Lyrics Filler: convert track duration ms→s for LRClib (exact-match was silently defeated) 2026-06-07 19:45:10 -07:00
orphan_file_detector.py Orphan detector: hard-bail on a mass-orphan flood instead of warn-only 2026-06-12 08:15:23 -07:00
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 CI: silence S110 on three intentional best-effort swallows (unblocks dev build) 2026-06-11 16:00:07 -07:00
replaygain_filler.py #437: add ReplayGain Filler library-maintenance job 2026-06-11 18:41:12 -07:00
single_album_dedup.py Fix: maintenance findings badge inflated when scan dedup-skipped 2026-05-04 08:55:13 -07:00
track_number_repair.py Canonical album version — Stage 4: Track Number Repair prefers canonical (read) 2026-06-02 11:47:42 -07:00
unknown_artist_fixer.py fix(repair): rewire Unknown Artist Fixer deferred imports (#646) 2026-05-19 22:09:15 -07:00