mirror of
https://github.com/Alvin-Zilverstand/novatorem.git
synced 2026-03-06 11:07:09 +01:00
fall back to recent song when listening to a podcast
This commit is contained in:
@@ -39,7 +39,7 @@ def refreshToken():
|
|||||||
|
|
||||||
headers = {"Authorization": "Basic {}".format(getAuth())}
|
headers = {"Authorization": "Basic {}".format(getAuth())}
|
||||||
response = requests.post(REFRESH_TOKEN_URL, data=data, headers=headers)
|
response = requests.post(REFRESH_TOKEN_URL, data=data, headers=headers)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return response.json()["access_token"]
|
return response.json()["access_token"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
@@ -92,7 +92,7 @@ def makeSVG(data):
|
|||||||
contentBar = "".join(["<div class='bar'></div>" for i in range(barCount)])
|
contentBar = "".join(["<div class='bar'></div>" for i in range(barCount)])
|
||||||
barCSS = barGen(barCount)
|
barCSS = barGen(barCount)
|
||||||
|
|
||||||
if data == {} or data["item"] == "None":
|
if data == {} or data["item"] == "None" or data["item"] is None:
|
||||||
# contentBar = "" #Shows/Hides the EQ bar if no song is currently playing
|
# contentBar = "" #Shows/Hides the EQ bar if no song is currently playing
|
||||||
currentStatus = "Was playing:"
|
currentStatus = "Was playing:"
|
||||||
recentPlays = recentlyPlayed()
|
recentPlays = recentlyPlayed()
|
||||||
|
|||||||
Reference in New Issue
Block a user