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:
@@ -1028,6 +1028,30 @@ func pickHeadAndTail(
|
||||
return out
|
||||
}
|
||||
|
||||
// systemMixDescription is the one line a client shows under a system mix's
|
||||
// name, saying what the mix is built from. Kept here so the web and Android
|
||||
// apps show the same words. Songs like and genre mixes have none: their names
|
||||
// already say what they hold.
|
||||
func systemMixDescription(variant string) string {
|
||||
switch variant {
|
||||
case "for_you":
|
||||
return "Built around the songs you play most"
|
||||
case "discover":
|
||||
return "Songs you haven’t heard that fit your taste"
|
||||
case "deep_cuts":
|
||||
return "Lesser-played tracks by artists you love"
|
||||
case "rediscover":
|
||||
return "Albums you loved and haven’t played lately"
|
||||
case "new_for_you":
|
||||
return "Recent additions picked for you"
|
||||
case "on_this_day":
|
||||
return "What you were playing around this date"
|
||||
case "first_listens":
|
||||
return "Songs you’ve never played"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// insertSystemPlaylist inserts a kind='system' playlists row plus its
|
||||
// playlist_tracks via AppendPlaylistTrack (which
|
||||
// does the snapshot lookup from tracks/albums/artists). Then recomputes
|
||||
@@ -1047,6 +1071,7 @@ func insertSystemPlaylist(ctx context.Context, qtx *dbq.Queries, userID pgtype.U
|
||||
p, err := qtx.CreateSystemPlaylist(ctx, dbq.CreateSystemPlaylistParams{
|
||||
UserID: userID,
|
||||
Name: name,
|
||||
Description: systemMixDescription(variant),
|
||||
SystemVariant: &variantStr,
|
||||
SeedArtistID: seedArtistID,
|
||||
CoverPath: nil,
|
||||
|
||||
Reference in New Issue
Block a user