mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
fix(web): restore SourceAccount guard in HandleDevicePlay
The guard was accidentally placed in HandlePlayRadioBrowser instead of HandleDevicePlay in the initial fix commit, then removed from there by the build-fix commit — leaving HandleDevicePlay with no guard at all. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
ca466ec2a3
commit
96e2c2e3cf
@@ -1038,6 +1038,11 @@ func (app *WebApp) HandleDevicePlay(w http.ResponseWriter, r *http.Request) {
|
||||
ContainerArt: req.ContainerArt,
|
||||
IsPresetable: req.IsPresetable,
|
||||
}
|
||||
// Only pass SourceAccount when it's a real credential, not the placeholder
|
||||
// value that speakers echo back (source name == source account, e.g. "TUNEIN").
|
||||
if req.SourceAccount != "" && req.SourceAccount != req.Source {
|
||||
contentItem.SourceAccount = req.SourceAccount
|
||||
}
|
||||
|
||||
if err := device.Client.SelectContentItem(contentItem); err != nil {
|
||||
app.sendError(w, err.Error(), http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user