From d88a20929ff66be58bca3634a511d658582960d2 Mon Sep 17 00:00:00 2001 From: Roderick van Domburg Date: Wed, 3 Aug 2022 23:21:38 +0200 Subject: [PATCH] Playlist ID should be Base62 encoded --- core/src/spclient.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/spclient.rs b/core/src/spclient.rs index e65e0bff..0b2f08a8 100644 --- a/core/src/spclient.rs +++ b/core/src/spclient.rs @@ -408,7 +408,7 @@ impl SpClient { } pub async fn get_playlist(&self, playlist_id: &SpotifyId) -> SpClientResult { - let endpoint = format!("/playlist/v2/playlist/{}", playlist_id); + let endpoint = format!("/playlist/v2/playlist/{:?}", playlist_id.to_base62()); self.request(&Method::GET, &endpoint, None, None).await } @@ -454,7 +454,7 @@ impl SpClient { .await } - pub async fn get_radio_for_track(&self, track_id: SpotifyId) -> SpClientResult { + pub async fn get_radio_for_track(&self, track_id: &SpotifyId) -> SpClientResult { let endpoint = format!( "/inspiredby-mix/v2/seed_to_playlist/{}?response-format=json", track_id.to_uri()?