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:
Tobias Gesellchen
2026-05-23 15:03:04 +02:00
co-authored by Claude Sonnet 4.6
parent ca466ec2a3
commit 96e2c2e3cf
+5
View File
@@ -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)