feat(subsonic): browse endpoints — getArtists/getAlbum/search3/… (#295) #8
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements Subsonic spec §8 browse surface so a third-party Subsonic client can browse artist → album → track after a scan. Closes Fable #295.
Endpoints
getMusicFolders— single folder (id=1, "Music")getIndexes/getArtists— alphabetical artist buckets;getIndexesaddslastModified(maxartists.updated_at, unix-ms) andignoredArticlesgetArtist— artist + nested albums (with track counts)getAlbum— album + full track list, parent artist namegetSong— single track + parent album/artist namesgetAlbumList2—newest | alphabeticalByName | alphabeticalByArtist | random | byGenrebacked by sqlc queries;recent | frequentstub to[]pending M2 play historysearch3— independent artist/album/song facets, each with its owncount/offsetShape
ar-/al-/tr-prefixes)[]notnull(clients reject the latter) — enforced atalbumRefsand insearch3's result initializertype,serverVersion,openSubsonic:true,apiKey) preservedTest plan
go vet ./...cleangolangci-lint runclean (errcheck, etc.)go test -race ./internal/subsonic/...green — covers UUID round-trip, index-letter bucketing (including#for digits,?for non-ASCII), content-type mapping, date/timestamp conversion, atoi/clamp, andgetMusicFolderswire shapeKnown non-regressions (pre-existing): album
duration: 0(scanner doesn't extract DurationMs yet — tracked separately); a couple of seeded artists bucket under "A" because theirsort_nameliterally starts with "Artist" (test-data artifact, not bug).