File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ use crate::{
3535 extended_metadata:: BatchedEntityRequest ,
3636 } ,
3737 token:: Token ,
38- version:: spotify_version ,
38+ version:: spotify_semantic_version ,
3939 Error , FileId , SpotifyId ,
4040} ;
4141
@@ -182,7 +182,7 @@ impl SpClient {
182182
183183 let client_data = request. mut_client_data ( ) ;
184184
185- client_data. client_version = spotify_version ( ) ;
185+ client_data. client_version = spotify_semantic_version ( ) ;
186186
187187 // Current state of affairs: keymaster ID works on all tested platforms, but may be phased out,
188188 // so it seems a good idea to mimick the real clients. `self.session().client_id()` returns the
Original file line number Diff line number Diff line change @@ -29,6 +29,13 @@ pub const SPOTIFY_MOBILE_VERSION: &str = "8.6.84";
2929pub const FALLBACK_USER_AGENT : & str = "Spotify/117300517 Linux/0 (librespot)" ;
3030
3131pub fn spotify_version ( ) -> String {
32+ match std:: env:: consts:: OS {
33+ "android" | "ios" => SPOTIFY_MOBILE_VERSION . to_owned ( ) ,
34+ _ => SPOTIFY_VERSION . to_string ( ) ,
35+ }
36+ }
37+
38+ pub fn spotify_semantic_version ( ) -> String {
3239 match std:: env:: consts:: OS {
3340 "android" | "ios" => SPOTIFY_MOBILE_VERSION . to_owned ( ) ,
3441 _ => SPOTIFY_SEMANTIC_VERSION . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments