]> git.plutz.net Git - serve0/blobdiff - templates/playctl.html.sh
time display for files from directory
[serve0] / templates / playctl.html.sh
index 6f435e7f4f6e5b379b82dc43ccf54f1ce8a1e2ad..8a94bd35ccf1feaa25d60e87931e7051bd1d8553 100755 (executable)
@@ -53,7 +53,7 @@ cat <<EOF
      <!--button type="submit" name="osd" value="progression">Progress</button -->
   </form>
 
-  <span class="info length">$(($length / 60)):$(($length % 60)) min</span>
+  <span class="info length">$(printf "%d:%02d min" $(($length / 60)) $(($length % 60)) )</span>
   <span class="info width" >Width: $width</span>
   <span class="info height">Height: $height</span><br>
   
@@ -103,8 +103,8 @@ EOF
 
 cnt=0
 progress \
-| while read n; do
-  printf '<span class="progress"><span style="width: %s%%;">%s</span></span>\n' $n $n
+| while read p t; do
+  printf '<span class="progress"><span style="width: %d%%;">%s</span></span>\n' "${p}" "${t}"
 done
 
 # vi:set filetype=html: