mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-09-07 15:07:17 +00:00
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:
co-authored by
Claude Sonnet 5
parent
268a7f7ac8
commit
c4e3ad33ad
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user