From 078db73e75738c1fb8f972a284fd453f0eab5810 Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Mon, 30 Mar 2026 00:20:20 -0400 Subject: [PATCH] feat: show release year instead of type on top release cards Added date field to LBTopReleaseGroup from the LB API's release_group.date. Card now displays the 4-digit year extracted via extractYear() instead of the release type. --- backend/explore/types.go | 3 +++ .../explore-artist-details/explore-artist-details.ts | 2 +- frontend/wailsjs/go/models.ts | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/explore/types.go b/backend/explore/types.go index f3f0134..b0a1252 100644 --- a/backend/explore/types.go +++ b/backend/explore/types.go @@ -114,6 +114,7 @@ type LBTopReleaseGroup struct { Title string `json:"title"` ArtistName string `json:"artistName"` Type string `json:"type"` + Date string `json:"date"` TotalListenCount int `json:"totalListenCount"` } @@ -126,6 +127,7 @@ type lbTopReleaseGroupWire struct { ReleaseGroup struct { Name string `json:"name"` Type string `json:"type"` + Date string `json:"date"` } `json:"release_group"` Artist struct { Artists []struct { @@ -145,6 +147,7 @@ func (w lbTopReleaseGroupWire) toPublic() LBTopReleaseGroup { Title: w.ReleaseGroup.Name, ArtistName: artistName, Type: w.ReleaseGroup.Type, + Date: w.ReleaseGroup.Date, TotalListenCount: w.TotalListenCount, } } diff --git a/frontend/src/components/explore-artist-details/explore-artist-details.ts b/frontend/src/components/explore-artist-details/explore-artist-details.ts index 75a2934..54e22ef 100644 --- a/frontend/src/components/explore-artist-details/explore-artist-details.ts +++ b/frontend/src/components/explore-artist-details/explore-artist-details.ts @@ -1212,7 +1212,7 @@ export class ExploreArtistDetails extends LitElement { ${rg.title}
- ${rg.type ? html`${rg.type}` : nothing} + ${rg.date ? html`${extractYear(rg.date)}` : nothing}
diff --git a/frontend/wailsjs/go/models.ts b/frontend/wailsjs/go/models.ts index e19d69d..f3c6da7 100755 --- a/frontend/wailsjs/go/models.ts +++ b/frontend/wailsjs/go/models.ts @@ -39,6 +39,7 @@ export namespace explore { title: string; artistName: string; type: string; + date: string; totalListenCount: number; static createFrom(source: any = {}) { @@ -51,6 +52,7 @@ export namespace explore { this.title = source["title"]; this.artistName = source["artistName"]; this.type = source["type"]; + this.date = source["date"]; this.totalListenCount = source["totalListenCount"]; } }