mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Revert most of cdf84925ad
This commit is contained in:
parent
dbf71c0dff
commit
42a665fb0d
3 changed files with 4 additions and 5 deletions
|
@ -2,7 +2,7 @@ use std::{fmt, path::PathBuf, str::FromStr};
|
|||
|
||||
use url::Url;
|
||||
|
||||
pub const KEYMASTER_CLIENT_ID: &str = "65b708073fc0480ea92a077233ca87bd";
|
||||
const KEYMASTER_CLIENT_ID: &str = "65b708073fc0480ea92a077233ca87bd";
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct SessionConfig {
|
||||
|
|
|
@ -19,7 +19,6 @@ use thiserror::Error;
|
|||
use crate::{
|
||||
apresolve::SocketAddress,
|
||||
cdn_url::CdnUrl,
|
||||
config::KEYMASTER_CLIENT_ID,
|
||||
error::ErrorKind,
|
||||
protocol::{
|
||||
canvaz::EntityCanvazRequest,
|
||||
|
@ -120,7 +119,7 @@ impl SpClient {
|
|||
message.set_request_type(ClientTokenRequestType::REQUEST_CLIENT_DATA_REQUEST);
|
||||
|
||||
let client_data = message.mut_client_data();
|
||||
client_data.set_client_id(KEYMASTER_CLIENT_ID.to_string());
|
||||
client_data.set_client_id(self.session().client_id());
|
||||
client_data.set_client_version(version::SEMVER.to_string());
|
||||
|
||||
let connectivity_data = client_data.mut_connectivity_sdk_data();
|
||||
|
|
|
@ -13,7 +13,7 @@ use std::time::{Duration, Instant};
|
|||
use serde::Deserialize;
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::{config::KEYMASTER_CLIENT_ID, Error};
|
||||
use crate::Error;
|
||||
|
||||
component! {
|
||||
TokenProvider : TokenProviderInner {
|
||||
|
@ -65,7 +65,7 @@ impl TokenProvider {
|
|||
|
||||
// scopes must be comma-separated
|
||||
pub async fn get_token(&self, scopes: &str) -> Result<Token, Error> {
|
||||
let client_id = KEYMASTER_CLIENT_ID;
|
||||
let client_id = self.session().client_id();
|
||||
if client_id.is_empty() {
|
||||
return Err(Error::invalid_argument("Client ID cannot be empty"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue