1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-04 02:09:26 +02:00

Add librespot-discovery crate

This commit is contained in:
Johannesd3 2021-03-01 00:10:13 +01:00 committed by johannesd3
parent 68818758a2
commit ebea5397b9
No known key found for this signature in database
GPG key ID: 8C2739E91D410F75
11 changed files with 473 additions and 314 deletions

View file

@ -645,11 +645,14 @@ async fn main() {
let mut connecting: Pin<Box<dyn future::FusedFuture<Output = _>>> = Box::pin(future::pending());
if setup.enable_discovery {
let config = setup.connect_config.clone();
let device_id = setup.session_config.device_id.clone();
discovery = Some(
librespot_connect::discovery::discovery(config, device_id, setup.zeroconf_port)
librespot::discovery::Discovery::builder(device_id)
.name(setup.connect_config.name.clone())
.device_type(setup.connect_config.device_type)
.port(setup.zeroconf_port)
.launch()
.unwrap(),
);
}