fix(player): use live device name in zone-candidate list

HandleGetZoneCandidates read entry.Device.DeviceInfo (the immutable
discovery-time snapshot) directly instead of Info(), missed when every
other handler in this file was migrated to the live-name accessor. A
speaker renamed after discovery kept showing its stale name in the
"add to my zone" picker indefinitely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-09-05 17:30:23 +02:00
co-authored by Claude Sonnet 5
parent 268a7f7ac8
commit c4e3ad33ad
+7 -2
View File
@@ -1368,11 +1368,16 @@ func (app *WebApp) HandleGetZoneCandidates(w http.ResponseWriter, r *http.Reques
candidates := make(map[string]zoneCandidate)
for _, entry := range app.DeviceSnapshot() {
if entry.Device == nil || entry.Device.DeviceInfo == nil {
if entry.Device == nil {
continue
}
candidates[entry.ID] = zoneCandidate{Info: entry.Device.DeviceInfo}
info := entry.Device.Info()
if info == nil {
continue
}
candidates[entry.ID] = zoneCandidate{Info: info}
}
w.Header().Set("Content-Type", "application/json")