This commit is contained in:
Lukas Schulz 2020-12-20 13:31:55 +01:00
parent 64657fd1d9
commit eac5ebc2c6

View file

@ -102,7 +102,8 @@ def drawCanvas():
if (cover_art is None): if (cover_art is None):
return return
if(was_playing and not is_playing): if(was_playing and not is_playing):
scrollDownSongInfo() scroll = threading.Thread(target=scrollDownSongInfo)
scroll.start()
if(is_playing): if(is_playing):
canvas.paste(cover_art,(cover_art_offset_x,cover_art_offset_y)) canvas.paste(cover_art,(cover_art_offset_x,cover_art_offset_y))
songinfo = ImageDraw.Draw(canvas) songinfo = ImageDraw.Draw(canvas)
@ -135,7 +136,7 @@ def scrollDownSongInfo(offset_x=0,offset_y=96):
songinfo.text((songinfo_offset_x,songinfo_offset_y+11+i), song_name) songinfo.text((songinfo_offset_x,songinfo_offset_y+11+i), song_name)
songinfo.text((songinfo_offset_x,songinfo_offset_y+i), artist_name) songinfo.text((songinfo_offset_x,songinfo_offset_y+i), artist_name)
showImage(canvas, offset_x, offset_y) showImage(canvas, offset_x, offset_y)
sleep(0.02)
def scrolling_text(text,offset_x=0,offset_y=0): def scrolling_text(text,offset_x=0,offset_y=0):