feat(discover): suggest full albums only (filter singles/EPs)

Discovery's "Suggested albums" surfaced singles and EPs because
_derive_albums filtered with is_core_release (Album/Single/EP). Add a
discovery-only _album_kind_ok gate that, when discover.albumsOnly (new
config, default true), requires primary_type == "Album" with no secondary
types. is_core_release is untouched — the monitor/scan still use it.

Exposed discover.albumsOnly in the discover config route + a Discovery
settings toggle. Worker + web tests added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-14 20:37:28 +02:00
parent 7957c621cf
commit c9905937cc
4 changed files with 58 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@ const DEFAULTS: Record<string, string> = {
"discover.intervalHours": "168",
"discover.similarPerSeed": "20",
"discover.albumsPerArtist": "1",
"discover.albumsOnly": "true",
"discover.minScore": "0",
"discover.chunkSize": "5",
"discover.listenBrainzUrl": "",
+9
View File
@@ -394,6 +394,7 @@ export function SettingsForm() {
artists are processed per worker cycle (keeps job-claiming responsive on big rosters).
<b> Similar per seed</b> candidates pulled per artist. <b>Albums per artist</b>
releases surfaced per suggested artist. <b>Min score</b> drops weak suggestions.{" "}
<b>Albums only</b> suggest full-length albums only, hiding singles and EPs.{" "}
<b>ListenBrainz base URL</b> leave blank for the default endpoint.
</HelpButton>
</div>
@@ -405,6 +406,14 @@ export function SettingsForm() {
</label>
))}
</div>
<label className="toggle" style={{ margin: "10px 0 0" }}>
<input
type="checkbox"
checked={discoverCfg["discover.albumsOnly"] !== "false"}
onChange={(e) => setCfg("discover.albumsOnly", e.target.checked ? "true" : "false")}
/>
Albums only (hide singles &amp; EPs)
</label>
<label className="field">
<span>ListenBrainz base URL (blank = default)</span>
<input value={discoverCfg["discover.listenBrainzUrl"] ?? ""}