This commit is contained in:
Lukas Schulz 2020-12-20 21:35:08 +01:00
parent 6c8d34a125
commit d5ce18db05

View file

@ -56,7 +56,7 @@ token = None #oauth2.SpotifyOAuth(username, scope, client_id, client_secret, red
#token = util.prompt_for_user_token(username, scope, client_id, client_secret, redirect_uri) #token = util.prompt_for_user_token(username, scope, client_id, client_secret, redirect_uri)
font = ImageFont.load_default() font = ImageFont.load_default()
clock_font = ImageFont.truetype(font='BebasNeue_Regular_1.otf', size=45) clock_font = ImageFont.truetype(font='BebasNeue_Regular_1.otf', size=60)
def get_track(): def get_track():
@ -220,10 +220,10 @@ def main():
def drawClock(): def drawClock():
while True: while True:
time.sleep(0.6) time.sleep(20)
canvas = Image.new('RGB', (128,64), color = 'black') canvas = Image.new('RGB', (128,64), color = 'black')
clock_text = ImageDraw.Draw(canvas) clock_text = ImageDraw.Draw(canvas)
clock_text.text((0,20), datetime.now().strftime("%H:%M:%S"), font = clock_font, align = "center") clock_text.text((0,0), datetime.now().strftime("%H:%M"), font = clock_font, align = "center")
showImage(canvas, 32, 0) showImage(canvas, 32, 0)