mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix example
This commit is contained in:
parent
bae304fdb0
commit
05dcb652a0
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue