From 741c4ae6dcf38bc5b0e891d78d2906300c2b0fbb Mon Sep 17 00:00:00 2001 From: KeelrLeek <156356974+KeelrLeek@users.noreply.github.com> Date: Wed, 5 Aug 2026 18:04:26 -0500 Subject: [PATCH] library: file a record you don't own off the payload's own field names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gap cards were reading `nb_tracks` and `date`, which are the shapes the prototype's generated collection.json used, not the ones CatalogAlbum actually carries — `track_count` and `release_date`. The year chip survived on a fallback; the track count reached the classifier as undefined, so the floor under it had nothing to weigh and every gap card leaned entirely on Deezer's record_type. They also now pass `is_live` and `is_soundtrack` through. Deezer has no record type for either, and the backend sets those flags from the tracklist and the Films/Games genre precisely so a live album that omits "Live" from its title can still be recognised — the artist page reads them, and there is no reason the same record filed on this page should not. --- src/views/Library.svelte | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/views/Library.svelte b/src/views/Library.svelte index a977655..4008645 100644 --- a/src/views/Library.svelte +++ b/src/views/Library.svelte @@ -988,10 +988,23 @@ {/snippet} {#snippet gapCard(r)} + + {@const cat = fileRelease({ + title: r.title, + record_type: r.record_type, + track_count: r.track_count, + is_live: r.is_live, + is_soundtrack: r.is_soundtrack, + })}
- {#if r.date?.slice(0, 4) || r.release_date?.slice(0, 4)} - {(r.release_date ?? r.date).slice(0, 4)} + {#if r.release_date?.slice(0, 4)} + {r.release_date.slice(0, 4)} {/if} {#if r.cover} @@ -1000,11 +1013,7 @@ {/if}
{r.title}
-
- {#if fileRelease({ title: r.title, record_type: r.record_type, track_count: r.nb_tracks }) !== "other"} - {CAT_ONE[fileRelease({ title: r.title, record_type: r.record_type, track_count: r.nb_tracks })]} - {/if} -
+
{cat === "other" ? "" : CAT_ONE[cat]}
{/snippet}