yes.
This commit is contained in:
parent
06041a5542
commit
622a652c53
1 changed files with 5 additions and 2 deletions
7
main.py
7
main.py
|
@ -38,13 +38,16 @@ def get_track():
|
|||
track = sp.currently_playing()
|
||||
print(track['is_playing'])
|
||||
print(track['item']['name'] + ' - ' + track['item']['artists'][0]['name'])
|
||||
print('getting image')
|
||||
imageString = requests.get(track['item']['album']['images'][0]['url'])
|
||||
image = Image.open(BytesIO(imageString.content))
|
||||
print('resizing image')
|
||||
image = image.resize((32,32))
|
||||
return image
|
||||
#return image
|
||||
#image.save("thumbnail.jpg","JPEG")
|
||||
screen.SetImage(thumbnail.convert('RGB'))
|
||||
print('set image')
|
||||
screen.SetImage(thumbnail.convert('RGB'))
|
||||
print('image set')
|
||||
|
||||
#if token:
|
||||
# sp = spotipy.Spotify(auth=token)
|
||||
|
|
Loading…
Reference in a new issue