Repository navigation
Tags
Tags
fix: location handling — persist user overrides and enforce location … …list policy Locations (and name/type overrides) assigned from the context menu were never persisted: the DiscoveryManager stores were not saved in the UI preferences nor reloaded at startup, so everything was lost on restart. - Persist and restore location_overrides, name_overrides and type_overrides in the UI preferences; wire the manager's location-prefs dirty callback through a thread-safe Qt signal so auto-stored locations are saved too. - Drop the FR/EN equivalence table in normalize_location_options: no translation handling, labels are shown as-is with case-insensitive dedup only (first occurrence wins, user entries are never replaced). - New DiscoveryManager.set_location_policy(list, auto_add): a discovered (mDNS/SSDP) location is applied only when present in the configured list (reusing the list's exact spelling, no case duplicates) or when "Add location" is enabled (then added to the list as-is); otherwise the device stays in "no location". Explicit user overrides always win. - Context menu now always offers the device's current location alongside the configured options (location_options_with_current). - Main window falls back to the locale default location presets when no list is configured; the auto-add flag from the Preferences dialog is now actually propagated. Bump version
Fix discovery of multi-homed hosts, the local machine, and legacy-uni… …cast mDNS responders Multi-homed hosts (e.g. the PC running NetNeighbor with ethernet + VirtualBox + APIPA interfaces) appeared as one device row per IP, and hiding one row hid them all since hide prefs match by name when no MAC/UID is available: - new utils/local_host.py: deterministic address ranking (choose_best_address), local-interface detection (is_local_host_ip), shared VIRTUAL_HOST_SUBNETS list (now imported by ssdp.py) - mdns: pick the best address instead of trusting zeroconf's unstable addresses[0]; key host aggregation by the SRV target (unique per machine) instead of the IP so one host stays one aggregate and stale endpoints are retired on address change - mdns: sticky per-host IP (10 min TTL) so partial zeroconf resolutions that only surface an APIPA record no longer flap the endpoint and churn the device row out of the UI The local machine never answers its own WSD probes (Windows limitation, verified with fdrespub running) and is invisible to NetBIOS browsing, so it was classified "Unknown Devices" from incidental mDNS adverts: - manager: classify any still-unknown device whose IP belongs to a local interface as computer (_apply_local_host_identity) Some embedded mDNS responders (e.g. Samba NAS) announce PTRs but never answer standard multicast queries, so get_service_info() always returned None and the host never appeared: - mdns: RFC 6762 §6.7 legacy-unicast fallback — resolve the instance label via the OS resolver, then query the host directly on port 5353 for SRV/TXT (60 s result cache, private IPs only) Bump version