feat(subsonic): add /rest/star and /rest/unstar handlers

Validate-all-first atomicity on star: a missing entity refuses the whole
call with Subsonic error 70. Unstar is a best-effort delete (missing
entities are no-ops, matching client expectations after library moves).
This commit is contained in:
2026-04-26 16:43:20 -04:00
parent 61d96bb288
commit 32fb3fec20
3 changed files with 322 additions and 0 deletions
+2
View File
@@ -38,6 +38,8 @@ func Mount(r chi.Router, pool *pgxpool.Pool, logger *slog.Logger, cfg Config, ev
register(sub, "/download", m.handleDownload)
register(sub, "/getCoverArt", m.handleGetCoverArt)
register(sub, "/scrobble", m.handleScrobble)
register(sub, "/star", m.handleStar)
register(sub, "/unstar", m.handleUnstar)
register(sub, "/getUser", handleGetUser)
// Subsonic clients expect every /rest/* miss to come back as a