chore(deps): mdns-sd 0.21 (ScopedIp addresses)

cc
This commit is contained in:
vicrodh committed 2026-08-29 08:26:25 -06:00
1 parent 1beb061198
commit d89397415b
2 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ description = "Casting support for QBZ - Chromecast, DLNA"
rust_cast = "0.21" rust_cast = "0.21"
# mDNS discovery # mDNS discovery
mdns-sd = "0.11" mdns-sd = "0.21"
# Local HTTP server for media streaming # Local HTTP server for media streaming
tiny_http = "0.12" tiny_http = "0.12"
+5 -1
View File
@@ -94,7 +94,11 @@ impl DeviceDiscovery {
.unwrap_or("Unknown") .unwrap_or("Unknown")
.to_string(); .to_string();
let ip = pick_ip(info.get_addresses()) // mdns-sd 0.21 scopes addresses by interface (ScopedIp);
// the pick only ever needed the bare IpAddr.
let addrs: std::collections::HashSet<IpAddr> =
info.get_addresses().iter().map(|a| a.to_ip_addr()).collect();
let ip = pick_ip(&addrs)
.unwrap_or_else(|| "127.0.0.1".to_string()); .unwrap_or_else(|| "127.0.0.1".to_string());
let device = DiscoveredDevice { let device = DiscoveredDevice {