mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
soundtouch-web had no logging on its play/select paths, which made issues like #345 (a source rejected by the speaker) hard to diagnose: a SoundTouch /select returns HTTP 200 even when the source is then rejected, so the failure only surfaces asynchronously as a now_playing transition to an error source, and nothing recorded it. Add two log points: - logPlaybackRequest: one line per play/select with the resolved source, sourceAccount, location and itemName, from all five handlers (source-select, device-play, play-url, radiobrowser, tunein). This is often the only record of what was actually requested. sourceAccount here is an account identifier, not a bearer credential. - logNowPlayingError: logs when a device's now_playing enters an error source (INVALID_SOURCE or any *_ERROR), deduped per transition, which is the real signal that a selection failed on the speaker. The two TuneIn/RadioBrowser handlers now resolve the ContentItem via stations.ResolveContentItem and select it directly so the log shows the authoritative outgoing source; the now-unused stations.Play wrapper is removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>