diff --git a/Cargo.lock b/Cargo.lock index ae52bab0..20655654 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2130,9 +2130,9 @@ dependencies = [ [[package]] name = "librespot-audio" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbda070a5598b32718e497f585f46891f7113e64aff20a13c0f2ba8fe7ccad9" +checksum = "7e07566fe7553042936c61bbdd9bedb524114a904aa7f9738e266c641468bab8" dependencies = [ "aes", "bytes", @@ -2151,9 +2151,9 @@ dependencies = [ [[package]] name = "librespot-core" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505a5ddd966231755994b60435607a1e8ae1d41c7f1169b078e0511bfb82d931" +checksum = "c4c76303efcf949a59f9380220ca420c4d72fa32dbb3641a0079f429cc5e44e7" dependencies = [ "aes", "base64 0.22.1", @@ -2207,9 +2207,9 @@ dependencies = [ [[package]] name = "librespot-metadata" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a10ab5a390f65281e763cd09c617b173f0e665994eae3d242526924625fdc66" +checksum = "7cf6d5c46a401b1dd3e062ebdce959aa694bbae1039841756545d2e9c4f8be5f" dependencies = [ "async-trait", "bytes", @@ -2225,9 +2225,9 @@ dependencies = [ [[package]] name = "librespot-oauth" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bda94233b358fb41c04ed15507c61136c80efe876c6e05a10ddb9a182b144e" +checksum = "00dcad779aa6c3b442e493e2a40ca83a5c5fcf38a65c05b026c3587bd4f8d14f" dependencies = [ "log", "oauth2", @@ -2237,9 +2237,9 @@ dependencies = [ [[package]] name = "librespot-playback" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1bcfe1d72c5ac14c798c7e3e1c20e1fb6af2b9c254794545cfcb1f2a4627e2" +checksum = "4ed1f776a04c8c9275407f8d4df034f2615ea729ec6c6d0fa69f423fc571df64" dependencies = [ "alsa", "cpal", @@ -2264,9 +2264,9 @@ dependencies = [ [[package]] name = "librespot-protocol" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6f343f573e0469d3ff8a02b99bbd9789faa01e2ff167332542ac840a8b31e7" +checksum = "80802f52b5a1b3a2157454e6aca483a627fbf7b942e0a5fea037ebf3ed8b0546" dependencies = [ "protobuf", "protobuf-codegen", diff --git a/Cargo.toml b/Cargo.toml index d71c293c..68a4cfd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,10 +46,10 @@ fern = "0.7" futures = "0.3" ioctl-rs = {version = "0.2", optional = true} libc = "0.2.161" -librespot-core = "0.5.0" -librespot-oauth = "0.5.0" -librespot-playback = "0.5.0" -librespot-protocol = "0.5.0" +librespot-core = "0.6.0" +librespot-oauth = "0.6.0" +librespot-playback = "0.6.0" +librespot-protocol = "0.6.0" log = "0.4.22" pancurses = {version = "0.17.0", optional = true} parse_duration = "2.1.1" diff --git a/src/authentication.rs b/src/authentication.rs index f26b6de2..d36bfade 100644 --- a/src/authentication.rs +++ b/src/authentication.rs @@ -7,6 +7,7 @@ use crate::config::{self, Config}; use crate::spotify::Spotify; pub const SPOTIFY_CLIENT_ID: &str = "65b708073fc0480ea92a077233ca87bd"; +pub const NCSPOT_CLIENT_ID: &str = "d420a117a32841c2b3474932e49fb54b"; pub const CLIENT_REDIRECT_URI: &str = "http://127.0.0.1:8989/login"; static OAUTH_SCOPES: &[&str] = &[ diff --git a/src/spotify_worker.rs b/src/spotify_worker.rs index 929473d4..23ce8236 100644 --- a/src/spotify_worker.rs +++ b/src/spotify_worker.rs @@ -1,3 +1,4 @@ +use crate::authentication; use crate::events::{Event, EventManager}; use crate::model::playable::Playable; use crate::queue::QueueEvent; @@ -74,7 +75,7 @@ impl Worker { let scopes = "user-read-private,playlist-read-private,playlist-read-collaborative,playlist-modify-public,playlist-modify-private,user-follow-modify,user-follow-read,user-library-read,user-library-modify,user-top-read,user-read-recently-played"; session .token_provider() - .get_token(scopes) + .get_token_with_client_id(scopes, authentication::NCSPOT_CLIENT_ID) .map(|response| sender.send(response.ok()).expect("token channel is closed")) .await; }