pick_best_album_release ranked Prowlarr candidates purely by popularity (seeders/grabs) -> quality -> size, with no check that the release is actually the requested album. Since Prowlarr returns broad fuzzy matches, the most-popular result could win regardless: a David Bowie '"Heroes" (2017 Remaster)' request downloaded 'Scary Monsters and Super Creeps' instead (~16x the grabs). Affects Usenet AND Torrent (both use this shared picker). Soulseek is unaffected — it uses the title/artist/track-coverage-aware album pre-flight (_score_album_folder) rather than this picker. Fix: add album_title_relevance() — token-coverage of the album's core title (year/edition/remaster noise stripped) against the release name — and gate candidates by it before popularity ranking. When album_name is supplied, drop sub-floor candidates and refuse (return None -> caller falls back to per-track search) rather than download a mismatch. Both usenet.py and torrent.py call sites now pass album_name/artist_name; callers that omit it keep the legacy popularity ranking. Tests: exact Heroes-vs-Scary-Monsters regression, relevance scoring, no-match refusal, multi-token coverage, and no-album-name back-compat. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| album_bundle.py | ||
| base.py | ||
| registry.py | ||
| torrent.py | ||
| types.py | ||
| usenet.py | ||