feat(devicemanager): prefer higher-priority discovery source when resolving device names and track per-device name source

This commit is contained in:
2026-01-09 14:09:55 +00:00
parent de34e83b3d
commit 4b61ed31bc
3 changed files with 103 additions and 32 deletions

View File

@@ -1,5 +1,15 @@
# Changelog
## 2026-01-09 - 2.1.0 - feat(devicemanager)
prefer higher-priority discovery source when resolving device names and track per-device name source
- Add TNameSource type and NAME_SOURCE_PRIORITY to rank name sources (generic, manual, airplay, chromecast, mdns, dlna, sonos).
- Replace chooseBestName with shouldUpdateName that validates 'real' names and uses source priority when deciding to update a device name.
- Add nameSourceByIp map to track which discovery source provided the current name and persist updates during registration.
- Register devices with an explicit nameSource (e.g. 'mdns', 'dlna', 'sonos', 'manual') and map speaker protocols to appropriate name sources.
- Ensure manual additions use 'manual' source and non-real names default to 'generic'.
- Clear nameSourceByIp entries when devices are removed/disconnected and on shutdown.
## 2026-01-09 - 2.0.0 - BREAKING CHANGE(core)
rework core device architecture: consolidate protocols into a protocols/ module, introduce UniversalDevice + factories, and remove many legacy device-specific classes (breaking API changes)