feat(playlists): playlists list their cover albums, and system mixes say what they hold
release / go (push) Successful in 2m2s
release / web (push) Successful in 1m26s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 4m11s
release / android (push) Successful in 4m10s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 2m48s
release / go (push) Successful in 2m2s
release / web (push) Successful in 1m26s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 4m11s
release / android (push) Successful in 4m10s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 2m48s
Each playlist on the wire (list and get) carries cover_album_ids: up to six distinct albums with art, in the order they first appear. A shelf of playlist tiles takes each tile's first album that no tile before it shows, so no cover repeats along the shelf. System mixes are stored with a one-line description of what they are built from, written in one place so the web and Android apps show the same words. Songs like and genre mixes have none; their names say it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,10 +39,16 @@ type playlistRowView struct {
|
||||
Refreshable bool `json:"refreshable"`
|
||||
SeedArtistID *string `json:"seed_artist_id,omitempty"`
|
||||
CoverURL string `json:"cover_url,omitempty"`
|
||||
TrackCount int32 `json:"track_count"`
|
||||
DurationSec int32 `json:"duration_sec"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
// CoverAlbumIDs are up to six distinct albums with cover art, in
|
||||
// track order (each album's art is /api/albums/{id}/cover). A shelf
|
||||
// of playlist tiles gives each tile the first of its albums no tile
|
||||
// before it already shows, so no cover repeats along the shelf.
|
||||
// Omitted when the playlist has none.
|
||||
CoverAlbumIDs []string `json:"cover_album_ids,omitempty"`
|
||||
TrackCount int32 `json:"track_count"`
|
||||
DurationSec int32 `json:"duration_sec"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
// playlistTrackView is one row of a playlist's track list on the wire.
|
||||
@@ -459,6 +465,9 @@ func playlistRowToView(r *playlists.PlaylistRow) playlistRowView {
|
||||
if r.CoverPath != nil && *r.CoverPath != "" {
|
||||
v.CoverURL = "/api/playlists/" + v.ID + "/cover"
|
||||
}
|
||||
for _, id := range r.CoverAlbumIDs {
|
||||
v.CoverAlbumIDs = append(v.CoverAlbumIDs, uuidToString(id))
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user