diff --git a/spotiplayer_pi/main.py b/spotiplayer_pi/main.py index bc614b2..4f9b22a 100644 --- a/spotiplayer_pi/main.py +++ b/spotiplayer_pi/main.py @@ -138,13 +138,20 @@ def display_loop(api: Api, cfg: Dict): w, h = bg.size w -= 95 - progress_time = data["progress_ms"] + int( - (time.time() - last_api_call) * 1000 + progress_time = min( + data["duration_ms"], + data["progress_ms"] + int((time.time() - last_api_call) * 1000), ) progress = min(1, progress_time / data["duration_ms"]) bar_width = int(w * progress) + draw.rectangle( + [(7, h - 23), (w + 3, h - 7)], + # outline=cfg["color_theme"]["text"], + outline=cfg["color_theme"]["bar_outline"], + ) draw.rectangle( [(8, h - 22), (w + 2, h - 8)], + # outline=cfg["color_theme"]["text"], outline=cfg["color_theme"]["bar_outline"], ) draw.rectangle(