mirror of
https://github.com/Xevion/spotify-quickauth.git
synced 2025-12-09 04:08:44 -06:00
Downgrade to librespot 0.4.2 for Cargo publish
This commit is contained in:
1841
Cargo.lock
generated
1841
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -10,8 +10,8 @@ repository = "https://github.com/Xevion/spotify-quickauth"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
librespot-discovery = { git = "https://github.com/librespot-org/librespot", branch = "dev", version = "0.5.0-dev" }
|
||||
librespot-core = { git = "https://github.com/librespot-org/librespot", branch = "dev", version = "0.5.0-dev" }
|
||||
librespot-discovery = { version = "0.4.2" }
|
||||
librespot-core = { version = "0.4.2" }
|
||||
serde = { version = "1.0.210", features = ["derive"] }
|
||||
tokio = { version = "1.40.0", features = ["full"] }
|
||||
futures = "0.3.30"
|
||||
|
||||
@@ -5,7 +5,6 @@ use librespot_core::config::DeviceType;
|
||||
use librespot_discovery::Discovery;
|
||||
use log::{info, warn};
|
||||
use sha1::{Digest, Sha1};
|
||||
use librespot_core::SessionConfig;
|
||||
use std::io::Write;
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
@@ -42,7 +41,7 @@ async fn main() {
|
||||
let device_id = hex::encode(Sha1::digest(device_name.as_bytes()));
|
||||
let device_type = DeviceType::Computer;
|
||||
|
||||
let mut server = Discovery::builder(device_id, SessionConfig::default().client_id)
|
||||
let mut server = Discovery::builder(device_id)
|
||||
.name(device_name.clone())
|
||||
.device_type(device_type)
|
||||
.launch()
|
||||
@@ -52,7 +51,7 @@ async fn main() {
|
||||
|
||||
let mut written = false;
|
||||
while let Some(credentials) = server.next().await {
|
||||
let result = File::create(&credentials_file).and_then(|mut file| {
|
||||
let result = File::create("./credentials.json").and_then(|mut file| {
|
||||
let data = serde_json::to_string(&credentials)?;
|
||||
write!(file, "{data}")
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user