From 5cecb467886f4aac9398ccc89f0bb680d2ea67eb Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Sun, 5 Apr 2026 12:43:26 -0700 Subject: [PATCH] Fix spotipy deprecation warning for get_access_token(as_dict=True) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed as_dict=True from all three OAuth callback sites. Spotipy will return token string directly in future versions — our code only checks truthiness so both dict and string work. --- web_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web_server.py b/web_server.py index cb9eb97d..833c3080 100644 --- a/web_server.py +++ b/web_server.py @@ -6716,7 +6716,7 @@ def spotify_callback(): cache_path=f'config/.spotify_cache_profile_{profile_id_from_state}', state=f'profile_{profile_id_from_state}' ) - token_info = auth_manager.get_access_token(auth_code, as_dict=True) + token_info = auth_manager.get_access_token(auth_code) if token_info: # Invalidate cached profile client so it gets recreated with new tokens with _profile_spotify_lock: @@ -6739,7 +6739,7 @@ def spotify_callback(): cache_path='config/.spotify_cache' ) - token_info = auth_manager.get_access_token(auth_code, as_dict=True) + token_info = auth_manager.get_access_token(auth_code) if token_info: # CRITICAL: update the GLOBAL spotify_client, not a local variable @@ -47652,7 +47652,7 @@ def start_oauth_callback_servers(): ) # Extract the authorization code and exchange it for tokens - token_info = auth_manager.get_access_token(auth_code, as_dict=True) + token_info = auth_manager.get_access_token(auth_code) if token_info: # Reinitialize the global client with new tokens