From 5d1538b37050e719f9968af8c8728f24ccc5519a Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sun, 4 Aug 2024 01:49:12 +0200 Subject: [PATCH] webui: handle playback_pos response with empty contents --- grzegorz_clients/remi_ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grzegorz_clients/remi_ui.py b/grzegorz_clients/remi_ui.py index 8918096..a56c26d 100644 --- a/grzegorz_clients/remi_ui.py +++ b/grzegorz_clients/remi_ui.py @@ -294,7 +294,7 @@ class RemiApp(App): except api.APIError: playback_pos = None - if playback_pos: + if playback_pos and playback_pos["current"] and playback_pos["total"]: slider_pos = playback_pos["current"] / playback_pos["total"] * 100 current = seconds_to_timestamp(playback_pos["current"]) total = seconds_to_timestamp(playback_pos["total"])