From 7f357cd4da1f308b0a66e73d32c2c88bb8eb0ab1 Mon Sep 17 00:00:00 2001 From: SimolZimol <70102430+SimolZimol@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:51:53 +0200 Subject: [PATCH] modified: app.py --- app.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app.py b/app.py index 9e52c1b..dea329f 100644 --- a/app.py +++ b/app.py @@ -14,7 +14,6 @@ import unicodedata app = Flask(__name__) app.secret_key = os.getenv("SECRET_KEY") -app.config['SESSION_PERMANENT'] = False # Erweiterte Berechtigungen für Web Playback SDK SCOPE = "user-library-read playlist-read-private streaming user-read-email user-read-private" @@ -36,15 +35,13 @@ def get_translations(): def get_spotify_client(): token_info = session.get("token_info", None) if not token_info: - # Kein Token, redirect handled elsewhere return None - # Prüfen, ob Token abgelaufen ist sp_oauth = SpotifyOAuth( client_id=os.getenv("SPOTIPY_CLIENT_ID"), client_secret=os.getenv("SPOTIPY_CLIENT_SECRET"), redirect_uri=os.getenv("SPOTIPY_REDIRECT_URI"), scope=SCOPE, - cache_path=".cache" + cache_path=None # <--- wichtig! ) if sp_oauth.is_token_expired(token_info): token_info = sp_oauth.refresh_access_token(token_info['refresh_token'])