mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
fix(tts): play via LOCAL_INTERNET_RADIO; accept app_key at /v1/auth
Root cause of the failed TTS playback: the /speaker notification path makes the speaker validate the app_key via GET /v1/auth against the service, which returned 404 -> the speaker reports an invalid app key (HandleInvalidAppKeyCb) and refuses to play. Our /media/tts hosting was fine all along (confirmed by a direct GET returning the mp3). Two fixes: - TTS speak now plays the synthesized clip as a LOCAL_INTERNET_RADIO ContentItem via the /custom/v1/playback proxy (the same mechanism the "ding" health check uses), which needs no app_key. New buildCustomPlaybackURL helper + tts.Service.BaseURL(). - Add GET /v1/auth -> 200 so the /speaker notification path also works (we're the cloud replacement; a 404 there is read as "invalid app key"). Includes a TEMPORARY full-request debug dump on /v1/auth to learn how the speaker presents the app_key; to be removed later. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
169c1c5b9f
commit
56c4ae4e2d
@@ -1283,6 +1283,11 @@ func setupRouter(server *handlers.Server, stockholmHandler *stockholm.Handler) *
|
||||
r.Get("/blacklist/{deviceId}", func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
||||
})
|
||||
// app_key validation for the /speaker notification endpoint. Real Bose
|
||||
// validated the app_key against its cloud; as the cloud replacement we
|
||||
// accept it (200). A 404 here makes the speaker report "invalid app key"
|
||||
// (HandleInvalidAppKeyCb) and refuse TTS/URL notifications.
|
||||
r.Get("/auth", server.HandleSpeakerAuth)
|
||||
})
|
||||
|
||||
r.Route("/mgmt", func(r chi.Router) {
|
||||
|
||||
@@ -100,6 +100,7 @@ GET /streaming/resources/api_versions.xml handlers.(
|
||||
GET /streaming/software/update/account/{account} handlers.(*Server).HandleMargeSoftwareUpdate-fm
|
||||
GET /streaming/sourceproviders handlers.(*Server).HandleMargeSourceProviders-fm
|
||||
GET /updates/soundtouch handlers.(*Server).HandleMargeSoftwareUpdate-fm
|
||||
GET /v1/auth handlers.(*Server).HandleSpeakerAuth-fm
|
||||
GET /v1/blacklist/{deviceId} setupRouter
|
||||
GET /web/* setupRouter.(*Server).HandleWeb
|
||||
HEAD /core02/svc-bmx-adapter-siriusxm-everest-eco1/prod/live-adapter handlers.(*Server).HandleSiriusXMLiveAdapter-fm
|
||||
|
||||
Reference in New Issue
Block a user