fix(reco): full-albums-only + slop filter + taller Recommendation rows
Owner-directed polish after testing the Recommendations tab.
- Full albums only: drop singles/EPs/boxsets/compilations from every album row
(Recommended Albums, Fresh Releases, Deep cuts). Qobuz's `release_type` is the
source of truth ("album" | "single" | "boxset" | "compilation"); when absent,
fall back to tracks_count >= 5. Kills the karaoke single that showed up under
Fresh Releases.
- Slop second layer: reject karaoke / tribute / "made famous by" / "in the style
of" / instrumental-version releases by artist-or-title keyword, applied both
pre-resolution (candidates) and post-resolution (the Qobuz album), so AI-slop
that still wears a full-album shape gets filtered.
- Taller rows in this view only: AlbumCard/ArtistCard/Carousel/ArtistCarousel
grow an overridable `card-height` (defaults unchanged, so Home/Search are
untouched); ExternalRecoView passes 266 to album rows and 256 to artist rows,
whose cards carry the "Similar to…" subtitle (~250px) and were clipping the
Follow chip at the old fixed 220.
cargo check -p qbz green.
cc
This commit is contained in:
7 files changed
+85
-12
No files matched your search
@@ -84,9 +84,13 @@ export component AlbumCard inherits Rectangle {
|
||||
// kind ("album") , album id, action ("play" | "queue" | "favorite").
|
||||
callback media-action(string, string, string);
|
||||
|
||||
// Fully deterministic height: artwork 200 + 6 spacer + 40 meta.
|
||||
// Deterministic height: artwork 200 + 6 spacer + 40 meta = 246. Overridable
|
||||
// per-context (Discover Recommendations gives the row extra breathing room
|
||||
// so the meta line never clips); the VerticalLayout is `alignment: start`,
|
||||
// so any extra height is quiet air below the card, not stretched content.
|
||||
in property <length> card-height: 246px;
|
||||
width: 200px;
|
||||
height: 246px;
|
||||
height: root.card-height;
|
||||
|
||||
// The overlay stays up while the pointer is anywhere over the artwork
|
||||
// OR over one of its buttons. A child button steals `has-hover` from
|
||||
|
||||
@@ -23,8 +23,12 @@ export component ArtistCard inherits Rectangle {
|
||||
// kind ("artist" | "label"), id, action ("follow").
|
||||
callback media-action(string, string, string);
|
||||
|
||||
// Overridable: with the optional "Similar to…" subtitle + a Follow chip the
|
||||
// content runs ~250px, so Discover Recommendations passes a taller value;
|
||||
// the default 220 keeps artist-search / Top Artists unchanged.
|
||||
in property <length> card-height: 220px;
|
||||
width: 160px;
|
||||
height: 220px;
|
||||
height: root.card-height;
|
||||
border-radius: 12px;
|
||||
background: ta.has-hover ? Theme.surface-elevated : Theme.surface-card;
|
||||
animate background { duration: 150ms; }
|
||||
|
||||
@@ -74,7 +74,9 @@ export component ArtistCarousel inherits VerticalLayout {
|
||||
callback view-all-clicked();
|
||||
|
||||
property <length> card-width: 160px;
|
||||
property <length> card-height: 220px;
|
||||
// Overridable so a host view (Discover Recommendations, whose cards carry a
|
||||
// "Similar to…" subtitle) can give the row a taller viewport + card.
|
||||
in property <length> card-height: 220px;
|
||||
property <length> gap: 16px;
|
||||
|
||||
property <int> count: root.artists.length;
|
||||
@@ -145,6 +147,7 @@ export component ArtistCarousel inherits VerticalLayout {
|
||||
spacing: root.gap;
|
||||
for artist in root.artists: ArtistCard {
|
||||
artist: artist;
|
||||
card-height: root.card-height;
|
||||
follow-mode: root.card-follow-mode;
|
||||
follow-kind: root.card-follow-kind;
|
||||
clicked(id) => {
|
||||
|
||||
@@ -74,7 +74,9 @@ export component Carousel inherits VerticalLayout {
|
||||
callback view-all-clicked();
|
||||
|
||||
property <length> card-width: 200px;
|
||||
property <length> card-height: 246px;
|
||||
// Overridable so a host view (Discover Recommendations) can give the row a
|
||||
// taller viewport + card when the default 246 clips the meta line.
|
||||
in property <length> card-height: 246px;
|
||||
property <length> gap: 32px;
|
||||
|
||||
property <int> count: root.section.albums.length;
|
||||
@@ -155,6 +157,7 @@ export component Carousel inherits VerticalLayout {
|
||||
spacing: root.gap;
|
||||
for album in root.section.albums: AlbumCard {
|
||||
album: album;
|
||||
card-height: root.card-height;
|
||||
clicked(id) => {
|
||||
root.album-clicked(id);
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ export component ExternalRecoView inherits VerticalLayout {
|
||||
if ExternalRecoState.rec-artists-common.length > 0: ArtistCarousel {
|
||||
title: @tr("More like the artists you love");
|
||||
artists: ExternalRecoState.rec-artists-common;
|
||||
card-height: 256px;
|
||||
artist-clicked(id) => {
|
||||
root.open-artist(id);
|
||||
}
|
||||
@@ -52,6 +53,7 @@ export component ExternalRecoView inherits VerticalLayout {
|
||||
if ExternalRecoState.rec-artists-recent.length > 0: ArtistCarousel {
|
||||
title: @tr("Based on what you've been into lately");
|
||||
artists: ExternalRecoState.rec-artists-recent;
|
||||
card-height: 256px;
|
||||
artist-clicked(id) => {
|
||||
root.open-artist(id);
|
||||
}
|
||||
@@ -63,6 +65,7 @@ export component ExternalRecoView inherits VerticalLayout {
|
||||
// Recommended Albums (Last.fm artist top-albums, not scrobbled).
|
||||
if ExternalRecoState.rec-albums.albums.length > 0: Carousel {
|
||||
section: ExternalRecoState.rec-albums;
|
||||
card-height: 266px;
|
||||
album-clicked(id) => {
|
||||
root.open-album(id);
|
||||
}
|
||||
@@ -74,6 +77,7 @@ export component ExternalRecoView inherits VerticalLayout {
|
||||
// Fresh Releases (ListenBrainz, from artists you follow).
|
||||
if ExternalRecoState.fresh-releases.albums.length > 0: Carousel {
|
||||
section: ExternalRecoState.fresh-releases;
|
||||
card-height: 266px;
|
||||
album-clicked(id) => {
|
||||
root.open-album(id);
|
||||
}
|
||||
@@ -103,6 +107,7 @@ export component ExternalRecoView inherits VerticalLayout {
|
||||
// Deep cuts from artists you know (Qobuz catalog albums).
|
||||
if ExternalRecoState.deep-cut-albums.albums.length > 0: Carousel {
|
||||
section: ExternalRecoState.deep-cut-albums;
|
||||
card-height: 266px;
|
||||
album-clicked(id) => {
|
||||
root.open-album(id);
|
||||
}
|
||||
@@ -114,6 +119,7 @@ export component ExternalRecoView inherits VerticalLayout {
|
||||
// Cold-start fallback — Qobuz editorial top albums.
|
||||
if ExternalRecoState.top-albums.albums.length > 0: Carousel {
|
||||
section: ExternalRecoState.top-albums;
|
||||
card-height: 266px;
|
||||
album-clicked(id) => {
|
||||
root.open-album(id);
|
||||
}
|
||||
@@ -126,6 +132,7 @@ export component ExternalRecoView inherits VerticalLayout {
|
||||
if ExternalRecoState.top-artists.length > 0: ArtistCarousel {
|
||||
title: @tr("Popular artists on Qobuz");
|
||||
artists: ExternalRecoState.top-artists;
|
||||
card-height: 256px;
|
||||
artist-clicked(id) => {
|
||||
root.open-artist(id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user