This commit is contained in:
Lukas Schulz 2020-12-20 13:19:49 +01:00
parent 05f4d71dbb
commit b151a40c6d

View file

@ -37,6 +37,9 @@ cache_path="/home/pi/.cache-"+username
is_playing = False is_playing = False
cover_art_offset_x = 0
cover_art_offset_y = 96
token = None #oauth2.SpotifyOAuth(username, scope, client_id, client_secret, redirect_uri) token = None #oauth2.SpotifyOAuth(username, scope, client_id, client_secret, redirect_uri)
#token = util.prompt_for_user_token(username, scope, client_id, client_secret, redirect_uri) #token = util.prompt_for_user_token(username, scope, client_id, client_secret, redirect_uri)
@ -187,6 +190,8 @@ if __name__ == "__main__":
while True: while True:
if(is_token_expired()): if(is_token_expired()):
get_access_token() get_access_token()
global token
token = refresh_access_token(token)
drawCanvas() drawCanvas()
time.sleep(10) time.sleep(10)