From 7eff3f8d78fcbbe3a1a7027fc9c26be021f3dce7 Mon Sep 17 00:00:00 2001 From: brandon Date: Wed, 8 May 2024 14:16:52 -0700 Subject: [PATCH] add --- .syncedlyrics/musixmatch_token.json | 2 +- spotifycontroller.py | 1 + templates/webapp.html | 40 +++++++++++++++++++++++++++-- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/.syncedlyrics/musixmatch_token.json b/.syncedlyrics/musixmatch_token.json index 2818718..71160cc 100644 --- a/.syncedlyrics/musixmatch_token.json +++ b/.syncedlyrics/musixmatch_token.json @@ -1 +1 @@ -{"token": "240425a54f5df91735a14b241dcfb1e5df28f942d95b9cad8ea6a4", "expiration_time": 1714086845} \ No newline at end of file +{"token": "240507e3d5a3f0210db7ad74bb1eebef70713e8e38024240de58b0", "expiration_time": 1715113140} \ No newline at end of file diff --git a/spotifycontroller.py b/spotifycontroller.py index e3c710e..da52687 100644 --- a/spotifycontroller.py +++ b/spotifycontroller.py @@ -103,6 +103,7 @@ def appdata(): currently_playing = requests.get("https://api.spotify.com/v1/me/player/currently-playing", headers=user_headers) + # needs to add an if statement that says if song is not playing then, becuase when nothing is playing the json response is different. if currently_playing.content: if currently_playing.json()["is_playing"] is True and currently_playing.json()["item"]["id"] == request.args.get('id'): print("QUICK" + str(time.time() - stime)) diff --git a/templates/webapp.html b/templates/webapp.html index 2a4199f..b44b0f3 100644 --- a/templates/webapp.html +++ b/templates/webapp.html @@ -7,6 +7,20 @@