mirror of
https://github.com/Xevion/spotify-quickauth.git
synced 2025-12-11 16: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"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
librespot-discovery = { git = "https://github.com/librespot-org/librespot", branch = "dev", version = "0.5.0-dev" }
|
librespot-discovery = { version = "0.4.2" }
|
||||||
librespot-core = { git = "https://github.com/librespot-org/librespot", branch = "dev", version = "0.5.0-dev" }
|
librespot-core = { version = "0.4.2" }
|
||||||
serde = { version = "1.0.210", features = ["derive"] }
|
serde = { version = "1.0.210", features = ["derive"] }
|
||||||
tokio = { version = "1.40.0", features = ["full"] }
|
tokio = { version = "1.40.0", features = ["full"] }
|
||||||
futures = "0.3.30"
|
futures = "0.3.30"
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ use librespot_core::config::DeviceType;
|
|||||||
use librespot_discovery::Discovery;
|
use librespot_discovery::Discovery;
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use sha1::{Digest, Sha1};
|
use sha1::{Digest, Sha1};
|
||||||
use librespot_core::SessionConfig;
|
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
#[tokio::main(flavor = "current_thread")]
|
#[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_id = hex::encode(Sha1::digest(device_name.as_bytes()));
|
||||||
let device_type = DeviceType::Computer;
|
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())
|
.name(device_name.clone())
|
||||||
.device_type(device_type)
|
.device_type(device_type)
|
||||||
.launch()
|
.launch()
|
||||||
@@ -52,7 +51,7 @@ async fn main() {
|
|||||||
|
|
||||||
let mut written = false;
|
let mut written = false;
|
||||||
while let Some(credentials) = server.next().await {
|
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)?;
|
let data = serde_json::to_string(&credentials)?;
|
||||||
write!(file, "{data}")
|
write!(file, "{data}")
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user