Merge pull request #1267 from acolombier/fix/update-spotify-version

fix: change spotify version needed in clientoken to use semantic format
This commit is contained in:
Roderick van Domburg 2024-03-31 11:40:02 +02:00 committed by GitHub
commit 9929635b5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,9 @@ pub const BUILD_ID: &str = env!("LIBRESPOT_BUILD_ID");
/// The protocol version of the Spotify desktop client. /// The protocol version of the Spotify desktop client.
pub const SPOTIFY_VERSION: u64 = 117300517; pub const SPOTIFY_VERSION: u64 = 117300517;
/// The semantic version of the Spotify desktop client.
pub const SPOTIFY_SEMANTIC_VERSION: &str = "1.2.31.1205.g4d59ad7c";
/// The protocol version of the Spotify mobile app. /// The protocol version of the Spotify mobile app.
pub const SPOTIFY_MOBILE_VERSION: &str = "8.6.84"; pub const SPOTIFY_MOBILE_VERSION: &str = "8.6.84";
@ -28,6 +31,6 @@ pub const FALLBACK_USER_AGENT: &str = "Spotify/117300517 Linux/0 (librespot)";
pub fn spotify_version() -> String { pub fn spotify_version() -> String {
match std::env::consts::OS { match std::env::consts::OS {
"android" | "ios" => SPOTIFY_MOBILE_VERSION.to_owned(), "android" | "ios" => SPOTIFY_MOBILE_VERSION.to_owned(),
_ => SPOTIFY_VERSION.to_string(), _ => SPOTIFY_SEMANTIC_VERSION.to_string(),
} }
} }