diff --git a/backend/explore/explore.go b/backend/explore/explore.go index bc2e2e4..46a9afd 100644 --- a/backend/explore/explore.go +++ b/backend/explore/explore.go @@ -124,7 +124,21 @@ func (e *Service) SearchLocal(query string) *MBSearchResult { var result MBSearchResult mergeIndexHits(&result, indexHits) - filterAndCap(&result) + + // Cap counts but skip the minBlendedScore filter — index hits + // use scalePopularity scores that shouldn't be compared to + // blended MB+LB scores. + if len(result.Artists) > maxResults { + result.Artists = result.Artists[:maxResults] + } + + if len(result.ReleaseGroups) > maxResults { + result.ReleaseGroups = result.ReleaseGroups[:maxResults] + } + + if len(result.Recordings) > maxResults { + result.Recordings = result.Recordings[:maxResults] + } return &result } 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 b92d677..289de25 100644 --- a/frontend/src/components/explore-artist-details/explore-artist-details.ts +++ b/frontend/src/components/explore-artist-details/explore-artist-details.ts @@ -1025,9 +1025,11 @@ export class ExploreArtistDetails extends LitElement { private renderTopSection() { const hasTracks = !this.loadingTracks && this.topTracks.length > 0; const hasReleases = !this.loadingTopReleases && this.topReleaseGroups.length > 0; - const isLoading = this.loadingTracks || this.loadingTopReleases; + const tracksLoading = this.loadingTracks; + const releasesLoading = this.loadingTopReleases; - if (isLoading) { + // Both still loading — show single loading state. + if (tracksLoading && releasesLoading) { return html`

Popular

@@ -1036,7 +1038,10 @@ export class ExploreArtistDetails extends LitElement { `; } - if (!hasTracks && !hasReleases) return nothing; + // Both done, neither has data. + if (!tracksLoading && !releasesLoading && !hasTracks && !hasReleases) { + return nothing; + } const expanded = this.topSectionExpanded; const trackLimit = expanded ? 10 : 5; @@ -1098,7 +1103,14 @@ export class ExploreArtistDetails extends LitElement { ` - : nothing} + : releasesLoading + ? html` +
+

Top Releases

+
Loading\u2026
+
+ ` + : nothing} ${canExpand ? html`