feat(subsonic): playlists and daily mixes, the weighted shuffle, and radio
release / go (push) Successful in 2m0s
release / web (push) Successful in 1m23s
release / govulncheck (push) Successful in 20s
release / integration (push) Failing after 4m23s
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 2m8s
release / android (push) Canceled after 3m38s

Subsonic apps now get what Minstrel picks, not only what it holds:

- getPlaylists lists the listener's daily mixes first, then their own
  playlists, then other people's public ones; getPlaylist returns the
  playable songs in order, as <entry> elements in XML.
- getRandomSongs answers with the weighted shuffle (likes up, skips down,
  the last hour's plays out), narrowed by genre and release year.
- getSimilarSongs and getSimilarSongs2 answer with Minstrel's radio, seeded
  from a song, or from a random song of an album or artist.

Radio's selection moves out of the /api/radio handler into
recommendation.Picker, built by recsettings.Service.Picker, so the web and
Android apps and the Subsonic apps pick through one piece of code and one
tuning. SongRef loses its XMLName so the field holding it names the element.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 14:25:49 -05:00
co-authored by Claude Opus 5.5
parent 66861a2bc4
commit bb2897dfd5
10 changed files with 1106 additions and 120 deletions
+21 -19
View File
@@ -162,26 +162,28 @@ type AlbumResponse struct {
// SongRef is the track projection used in album detail, getSong, search3,
// and later streaming/now-playing responses.
//
// It carries no XMLName: the field that holds it names the element, "song"
// in most responses and "entry" in a playlist.
type SongRef struct {
XMLName xml.Name `json:"-" xml:"song"`
ID string `json:"id" xml:"id,attr"`
Parent string `json:"parent,omitempty" xml:"parent,attr,omitempty"`
Title string `json:"title" xml:"title,attr"`
Album string `json:"album,omitempty" xml:"album,attr,omitempty"`
Artist string `json:"artist,omitempty" xml:"artist,attr,omitempty"`
ArtistID string `json:"artistId,omitempty" xml:"artistId,attr,omitempty"`
AlbumID string `json:"albumId,omitempty" xml:"albumId,attr,omitempty"`
Track int `json:"track,omitempty" xml:"track,attr,omitempty"`
DiscNumber int `json:"discNumber,omitempty" xml:"discNumber,attr,omitempty"`
Genre string `json:"genre,omitempty" xml:"genre,attr,omitempty"`
CoverArt string `json:"coverArt,omitempty" xml:"coverArt,attr,omitempty"`
Size int64 `json:"size,omitempty" xml:"size,attr,omitempty"`
ContentType string `json:"contentType,omitempty" xml:"contentType,attr,omitempty"`
Suffix string `json:"suffix,omitempty" xml:"suffix,attr,omitempty"`
Duration int `json:"duration,omitempty" xml:"duration,attr,omitempty"`
BitRate int `json:"bitRate,omitempty" xml:"bitRate,attr,omitempty"`
IsDir bool `json:"isDir" xml:"isDir,attr"`
Type string `json:"type" xml:"type,attr"`
ID string `json:"id" xml:"id,attr"`
Parent string `json:"parent,omitempty" xml:"parent,attr,omitempty"`
Title string `json:"title" xml:"title,attr"`
Album string `json:"album,omitempty" xml:"album,attr,omitempty"`
Artist string `json:"artist,omitempty" xml:"artist,attr,omitempty"`
ArtistID string `json:"artistId,omitempty" xml:"artistId,attr,omitempty"`
AlbumID string `json:"albumId,omitempty" xml:"albumId,attr,omitempty"`
Track int `json:"track,omitempty" xml:"track,attr,omitempty"`
DiscNumber int `json:"discNumber,omitempty" xml:"discNumber,attr,omitempty"`
Genre string `json:"genre,omitempty" xml:"genre,attr,omitempty"`
CoverArt string `json:"coverArt,omitempty" xml:"coverArt,attr,omitempty"`
Size int64 `json:"size,omitempty" xml:"size,attr,omitempty"`
ContentType string `json:"contentType,omitempty" xml:"contentType,attr,omitempty"`
Suffix string `json:"suffix,omitempty" xml:"suffix,attr,omitempty"`
Duration int `json:"duration,omitempty" xml:"duration,attr,omitempty"`
BitRate int `json:"bitRate,omitempty" xml:"bitRate,attr,omitempty"`
IsDir bool `json:"isDir" xml:"isDir,attr"`
Type string `json:"type" xml:"type,attr"`
// ReplayGain is OpenSubsonic's replayGain: Minstrel's own
// measurements, so third-party clients that level by ReplayGain do it
// from the same numbers the Minstrel apps use. Omitted until measured.