mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
commit
59782fe285
1 changed files with 3 additions and 7 deletions
|
@ -218,11 +218,7 @@ pub fn discovery(handle: &Handle, config: ConnectConfig, device_id: String, port
|
||||||
http.serve_addr_handle(&format!("0.0.0.0:{}", port).parse().unwrap(), &handle, move || Ok(discovery.clone())).unwrap()
|
http.serve_addr_handle(&format!("0.0.0.0:{}", port).parse().unwrap(), &handle, move || Ok(discovery.clone())).unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "with-dns-sd")]
|
let s_port = serve.incoming_ref().local_addr().port();
|
||||||
let port = serve.incoming_ref().local_addr().port();
|
|
||||||
|
|
||||||
#[cfg(not(feature = "with-dns-sd"))]
|
|
||||||
let addr = serve.incoming_ref().local_addr();
|
|
||||||
|
|
||||||
let server_future = {
|
let server_future = {
|
||||||
let handle = handle.clone();
|
let handle = handle.clone();
|
||||||
|
@ -239,7 +235,7 @@ pub fn discovery(handle: &Handle, config: ConnectConfig, device_id: String, port
|
||||||
"_spotify-connect._tcp",
|
"_spotify-connect._tcp",
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
port,
|
s_port,
|
||||||
&["VERSION=1.0", "CPath=/"]).unwrap();
|
&["VERSION=1.0", "CPath=/"]).unwrap();
|
||||||
|
|
||||||
#[cfg(not(feature = "with-dns-sd"))]
|
#[cfg(not(feature = "with-dns-sd"))]
|
||||||
|
@ -249,7 +245,7 @@ pub fn discovery(handle: &Handle, config: ConnectConfig, device_id: String, port
|
||||||
let svc = responder.register(
|
let svc = responder.register(
|
||||||
"_spotify-connect._tcp".to_owned(),
|
"_spotify-connect._tcp".to_owned(),
|
||||||
config.name,
|
config.name,
|
||||||
addr.port(),
|
s_port,
|
||||||
&["VERSION=1.0", "CPath=/"]);
|
&["VERSION=1.0", "CPath=/"]);
|
||||||
|
|
||||||
Ok(DiscoveryStream {
|
Ok(DiscoveryStream {
|
||||||
|
|
Loading…
Reference in a new issue