Files
Bose-SoundTouch/pkg
Tobias GesellchenandClaude Opus 4.8 426036c911 feat(player): DLNA music library backend (native STORED_MUSIC, device-scoped)
Wires the soundtouch-player control API for browsing and playing DLNA
media-server content on a speaker, using the validated native STORED_MUSIC
path (the speaker is the DLNA control point; no AfterTouch proxy).

Routes (under /api/control):
- GET  /providers/library/servers            LAN-wide SSDP sweep (discovery.DiscoverMediaServers)
- GET  /devices/{id}/library/servers         STORED_MUSIC sources registered on this speaker (+ ready)
- POST /devices/{id}/library/servers         register a server (setMusicServiceAccount; 1024 = already present)
- DELETE /devices/{id}/library/servers/{account}  unregister
- GET  /devices/{id}/library/browse          speaker /navigate (root or container) -> location tokens
- POST /devices/{id}/library/play            select a STORED_MUSIC ContentItem (type=track)
- GET  /app/library                          SPA deep link

Browsing goes through the speaker's own /navigate so the returned location
tokens are the ones /select accepts; the raw DLNA ContentDirectory IDs are
not playable, so pkg/dlna is intentionally not on this path. All handlers
reuse existing client methods (Navigate, NavigateContainer, SelectContentItem,
GetSources, AddStoredMusicAccount, RemoveStoredMusicAccount) and the existing
APIResponse envelope. Unit tests cover play XML shape, browse mapping,
source filtering, idempotent register, and validation/404s.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:50:49 +02:00
..