From e03e48d08ffcd76b3911ba9a22958f4b204d4597 Mon Sep 17 00:00:00 2001 From: Sijmen Date: Tue, 2 May 2023 01:56:48 +0200 Subject: [PATCH] Stop progress bar when paused --- templates/player.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/player.html b/templates/player.html index 714bd54..ed64167 100644 --- a/templates/player.html +++ b/templates/player.html @@ -64,6 +64,7 @@ document.title = "Empede"; {% endif %} + {% if state == mpdrs::State::Play %} progressBar = document.querySelector(".nowplaying .progress"); elapsed = {{ elapsed }}; duration = {{ duration }}; @@ -77,4 +78,5 @@ let progress = elapsed / duration; progressBar.style.width = `${progress * 100}%`; }, 1000); + {% endif %} \ No newline at end of file