feat: Your genres leads with the genres you play most, not A to Z
release / web (push) Successful in 1m8s
release / go (push) Successful in 1m40s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 3m43s
release / android (push) Successful in 4m21s
release / Build signed APK (push) Successful in 4m55s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 22s
release / Verify release artifacts (tag releases only) (push) Skipped
release / web (push) Successful in 1m8s
release / go (push) Successful in 1m40s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 3m43s
release / android (push) Successful in 4m21s
release / Build signed APK (push) Successful in 4m55s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 22s
release / Verify release artifacts (tag releases only) (push) Skipped
The genre mix builder already ranks genres by how much you listen to them (taste profile, then plays and likes, then library size), but the rank was lost when the mixes were stored and both apps sorted the shelf by name. Each playlist now has a shelf_rank (migration 0107), which the genre builder fills 1..n in that listening order, even where it picked a narrower genre before a broader one. The list and detail endpoints carry it, and the web and Android Home sort the genre shelf by it, unranked playlists after by name. Android's playlist cache gains the column (Room v14). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,10 +45,14 @@ type playlistRowView struct {
|
||||
// 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"`
|
||||
// ShelfRank is a system mix's place on its Home shelf, 1 first: genre
|
||||
// mixes are numbered by how much the user listens to each genre.
|
||||
// Omitted (0) for playlists the client orders itself.
|
||||
ShelfRank int32 `json:"shelf_rank,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.
|
||||
@@ -453,6 +457,7 @@ func playlistRowToView(r *playlists.PlaylistRow) playlistRowView {
|
||||
Kind: r.Kind,
|
||||
SystemVariant: r.SystemVariant,
|
||||
Refreshable: r.SystemVariant != nil && playlists.RefreshableSystemKind(*r.SystemVariant),
|
||||
ShelfRank: r.ShelfRank,
|
||||
TrackCount: r.TrackCount,
|
||||
DurationSec: r.DurationSec,
|
||||
CreatedAt: formatTimestamp(r.CreatedAt),
|
||||
|
||||
Reference in New Issue
Block a user