yes.
This commit is contained in:
parent
4d1e277743
commit
be96793022
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -39,7 +39,7 @@ token = util.prompt_for_user_token(username, scope, client_id, client_secret, re
|
||||||
font = ImageFont.load_default()
|
font = ImageFont.load_default()
|
||||||
|
|
||||||
def get_track():
|
def get_track():
|
||||||
print('getting info')
|
#print('getting info')
|
||||||
sp = spotipy.Spotify(auth=token)
|
sp = spotipy.Spotify(auth=token)
|
||||||
track = sp.currently_playing()
|
track = sp.currently_playing()
|
||||||
global is_playing
|
global is_playing
|
||||||
|
@ -48,8 +48,8 @@ def get_track():
|
||||||
song_name = track['item']['name']
|
song_name = track['item']['name']
|
||||||
global artist_name
|
global artist_name
|
||||||
artist_name = track['item']['artists'][0]['name']
|
artist_name = track['item']['artists'][0]['name']
|
||||||
print(track['item']['name'] + ' - ' + track['item']['artists'][0]['name'])
|
#print(track['item']['name'] + ' - ' + track['item']['artists'][0]['name'])
|
||||||
print('getting image')
|
#print('getting image')
|
||||||
image_url = track['item']['album']['images'][0]['url']
|
image_url = track['item']['album']['images'][0]['url']
|
||||||
response = requests.get(image_url)
|
response = requests.get(image_url)
|
||||||
image = Image.open(BytesIO(response.content))
|
image = Image.open(BytesIO(response.content))
|
||||||
|
|
Loading…
Reference in a new issue