feat(subsonic): browse by genre and by folder
release / web (push) Successful in 1m16s
release / go (push) Successful in 1m47s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 3m59s
release / android (push) Successful in 4m30s
release / Build signed APK (push) Successful in 4m56s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 15s
release / Verify release artifacts (tag releases only) (push) Skipped

Subsonic apps can now list genres and play one (getGenres,
getSongsByGenre), and apps that browse by folder, such as DSub, can open
an artist to its albums and an album to its songs (getMusicDirectory),
with the album lists and search they use in that mode (getAlbumList,
search2).

Genres are split and counted as the web's genre index counts them, now
with an album count beside the song count. A genre's songs leave out the
listener's quarantined ones and missing files. Folders are Minstrel's
artists and albums, under the same ids as the tag-based calls.

getAlbumList2 and search3 now share their selection with the folder
versions, so the two modes list and find the same things.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 16:40:21 -05:00
co-authored by Claude Opus 5.5
parent da64d95264
commit 8731e9695a
9 changed files with 737 additions and 73 deletions
+6 -3
View File
@@ -160,8 +160,8 @@ type AlbumResponse struct {
Album AlbumDetail `json:"album" xml:"album"`
}
// SongRef is the track projection used in album detail, getSong, search3,
// and later streaming/now-playing responses.
// SongRef is Subsonic's Child: a song in album detail, getSong, search3 and
// the lists of songs, and in folder browsing an album too (albumFolder).
//
// It carries no XMLName: the field that holds it names the element, "song"
// in most responses and "entry" in a playlist.
@@ -182,8 +182,11 @@ type SongRef struct {
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"`
Year int `json:"year,omitempty" xml:"year,attr,omitempty"`
Created string `json:"created,omitempty" xml:"created,attr,omitempty"`
IsDir bool `json:"isDir" xml:"isDir,attr"`
Type string `json:"type" xml:"type,attr"`
// Type is "music" on a song; an album shown as a folder has none.
Type string `json:"type,omitempty" xml:"type,attr,omitempty"`
// 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.