mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-05 10:49:40 +02:00
Add configurable client ID and listen for updates
This commit is contained in:
parent
0b7ccc803c
commit
32df4a401d
6 changed files with 34 additions and 24 deletions
|
@ -52,8 +52,6 @@ struct TokenData {
|
|||
}
|
||||
|
||||
impl TokenProvider {
|
||||
const KEYMASTER_CLIENT_ID: &'static str = "65b708073fc0480ea92a077233ca87bd";
|
||||
|
||||
fn find_token(&self, scopes: Vec<&str>) -> Option<usize> {
|
||||
self.lock(|inner| {
|
||||
for i in 0..inner.tokens.len() {
|
||||
|
@ -84,8 +82,8 @@ impl TokenProvider {
|
|||
let query_uri = format!(
|
||||
"hm://keymaster/token/authenticated?scope={}&client_id={}&device_id={}",
|
||||
scopes,
|
||||
Self::KEYMASTER_CLIENT_ID,
|
||||
self.session().device_id()
|
||||
self.session().client_id(),
|
||||
self.session().device_id(),
|
||||
);
|
||||
let request = self.session().mercury().get(query_uri)?;
|
||||
let response = request.await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue