Fix example

This commit is contained in:
Roderick van Domburg 2022-10-02 00:08:36 +02:00
parent bae304fdb0
commit 05dcb652a0
No known key found for this signature in database
GPG key ID: FE2585E713F9F30A

View file

@ -1,4 +1,5 @@
use futures::StreamExt; use futures::StreamExt;
use librespot_core::SessionConfig;
use librespot_discovery::DeviceType; use librespot_discovery::DeviceType;
use sha1::{Digest, Sha1}; use sha1::{Digest, Sha1};
@ -7,7 +8,7 @@ async fn main() {
let name = "Librespot"; let name = "Librespot";
let device_id = hex::encode(Sha1::digest(name.as_bytes())); let device_id = hex::encode(Sha1::digest(name.as_bytes()));
let mut server = librespot_discovery::Discovery::builder(device_id) let mut server = librespot_discovery::Discovery::builder(device_id, SessionConfig::default().client_id)
.name(name) .name(name)
.device_type(DeviceType::Computer) .device_type(DeviceType::Computer)
.launch() .launch()