yes.
This commit is contained in:
parent
f0a03867de
commit
05f4d71dbb
1 changed files with 2 additions and 0 deletions
2
main.py
2
main.py
|
@ -47,6 +47,8 @@ def get_track():
|
||||||
print('getting current song info')
|
print('getting current song info')
|
||||||
sp = spotipy.Spotify(auth=token)
|
sp = spotipy.Spotify(auth=token)
|
||||||
track = sp.currently_playing()
|
track = sp.currently_playing()
|
||||||
|
if track is None:
|
||||||
|
return
|
||||||
global is_playing
|
global is_playing
|
||||||
is_playing = track['is_playing']
|
is_playing = track['is_playing']
|
||||||
global song_name
|
global song_name
|
||||||
|
|
Loading…
Reference in a new issue