]> git.plutz.net Git - serve0/blobdiff - templates/playctl.html.sh
discard previous status lines when feeding progrss bar
[serve0] / templates / playctl.html.sh
index 8a94bd35ccf1feaa25d60e87931e7051bd1d8553..e361ddae4cb316de57237f93aea8cf7f2c4ec4c3 100755 (executable)
@@ -104,7 +104,7 @@ EOF
 cnt=0
 progress \
 | while read p t; do
-  printf '<span class="progress"><span style="width: %d%%;">%s</span></span>\n' "${p}" "${t}"
+  printf '<span class="progress"><span style="width: %d%%;">%d:%02d</span></span>\n' "${p}" "$(($t / 60))" "$(($t % 60))"
 done
 
 # vi:set filetype=html: