yes.
This commit is contained in:
parent
b550e2d703
commit
803aeb696c
1 changed files with 3 additions and 4 deletions
7
main.py
7
main.py
|
@ -2,7 +2,7 @@ import sys
|
|||
import spotipy
|
||||
import spotipy.util as util
|
||||
import config as cfg
|
||||
from PIL import Image, ImageDraw
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
import asyncio
|
||||
from rgbmatrix import RGBMatrix, RGBMatrixOptions
|
||||
import threading
|
||||
|
@ -89,9 +89,8 @@ def drawCanvas():
|
|||
songinfo.text((songinfo_offset_x,songinfo_offset_y+10), song_name)
|
||||
songinfo.text((songinfo_offset_x,songinfo_offset_y), artist_name)
|
||||
showImage(canvas)
|
||||
scrolled_text_canvas = Image.new('RGB', (10, 32), color = 'black')
|
||||
scrolled_text = ImageDraw.Draw(scrolled_text)
|
||||
if(scrolled_text.textlength(song_name)>160):
|
||||
font = ImageFont.truetype()
|
||||
if(font.getsize(song_name)[0]>160):
|
||||
x = threading.Thread(target=scrolling_text,args=(song_name,songinfo_offset_x,songinfo_offset_y+10))
|
||||
if(ImageDraw.textlength(artist_name)>160):
|
||||
y = threading.Thread(target=scrolling_text,args=(artist_name,songinfo_offset_x,songinfo_offset_y))
|
||||
|
|
Loading…
Reference in a new issue