soulsync/core/repair_jobs
Broque Thomas 39a07e4bdf Fix Discography Backfill silently skipping most releases
Two bugs kept this job from finding anything useful on a typical library.

1. Wrong Deezer column name. The artists table has a deezer_id column
   (per music_database.py:1986), but the job looked for deezer_artist_id
   in both _scan_artist (line 132) and _get_library_artists (line 345).
   For Deezer-primary users, this meant the Deezer ID never made it into
   the source_ids map, so get_artist_discography fell back to artist-
   name-only search — slower and less accurate than an ID lookup.

2. Spotify-reported EPs were silently excluded. Spotify lumps EPs and
   true singles under album_type='single'. The previous
   _should_include_release short-circuited on album_type='single' and
   returned the include_singles setting (default False), so 4-6 track
   EPs on Spotify-primary libraries never survived the filter — even
   though include_eps defaulted to True. Only 7+ track full albums
   made it through. This is the main reason users felt the job did
   nothing.

Fixes:

- Use the correct deezer_id column name in both reference sites.

- Restructure _should_include_release so only 'album', 'ep', and
  'compilation' are trusted outright. Anything else (including
  'single' and missing type) falls through to a track-count
  disambiguation matching the download pipeline's _get_album_type_display:
  1-3 tracks = true single, 4-6 = EP, 7+ = album. A Spotify-returned
  'single' with 5 tracks now correctly counts as an EP.

Full suite stays at 263 passed. Ruff clean.
2026-04-21 17:26:38 -07:00
..
__init__.py Add Discography Backfill maintenance job 2026-04-20 22:04:38 -07:00
acoustid_scanner.py Fix null-pointer error in acoustid_scanner 2026-04-17 19:17:24 +03:00
album_completeness.py Share metadata source priority 2026-04-15 07:48:25 +03:00
album_tag_consistency.py Fix Album Tag Consistency job: add missing _get_settings method 2026-03-24 06:38:05 -07:00
base.py Improve graceful shutdown and rollback safety 2026-04-12 15:17:18 +03:00
cache_evictor.py Add metadata cache maintenance and health monitoring 2026-03-30 07:40:20 -07:00
dead_file_cleaner.py Fix dead file cleaner false positives from transfer path resolution failure 2026-03-17 09:51:31 -07:00
discography_backfill.py Fix Discography Backfill silently skipping most releases 2026-04-21 17:26:38 -07:00
duplicate_detector.py Clean up 286 ruff lint errors to unblock CI and fix 10 latent bugs 2026-04-21 13:30:52 -07:00
fake_lossless_detector.py Enrich repair findings with album art, artist images & live job progress 2026-03-15 14:08:26 -07:00
library_reorganize.py Clean up 286 ruff lint errors to unblock CI and fix 10 latent bugs 2026-04-21 13:30:52 -07:00
live_commentary_cleaner.py Add acappella to live/commentary cleaner patterns 2026-04-11 13:56:56 -07:00
lossy_converter.py Add independent Blasphemy Mode setting for lossy converter job 2026-03-22 08:08:47 -07:00
mbid_mismatch_detector.py Fix MBID Mismatch Detector comparing MB title against DB title (filename) instead of embedded tag 2026-04-14 12:19:41 -07:00
metadata_gap_filler.py Make metadata gap filler source-aware 2026-04-15 21:35:57 +03:00
missing_cover_art.py Respect source preference in cover art repair job 2026-04-15 21:28:12 +03:00
orphan_file_detector.py Fix dismissed findings reappearing and reduce false orphan detections 2026-04-10 17:42:39 -07:00
single_album_dedup.py Fix bulk Fix All ignoring Single/Album Dedup findings and expand version keywords 2026-03-19 08:53:14 -07:00
track_number_repair.py Clean up 286 ruff lint errors to unblock CI and fix 10 latent bugs 2026-04-21 13:30:52 -07:00
unknown_artist_fixer.py Fix unknown_artist_fixer crash on missing deezer_track_id column 2026-04-20 16:29:38 -07:00