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