]> git.plutz.net Git - serve0/blobdiff - pages/list.sh
time display for files from directory
[serve0] / pages / list.sh
index 4d25103059d14932a90e552442c7cd152ca41df1..284b9185740897cde272e5cc4776dbc3c9c7d15e 100755 (executable)
@@ -74,8 +74,7 @@ _printVideo(){
     linkinfo="$(urlsafe "$info")"
     htmlinfo="$(htmlsafe "$info")"
 
-    [ "$(($length % 60))" -lt 10 ] && minutes="$(($length / 60)):0$(($length % 60))" \
-                                   || minutes="$(($length / 60)):$(($length % 60))"
+    minutes="$(printf "%d:%02d" $(($length / 60)) $(($length % 60)) )"
 
     tee "$cache" <<VIDEOend
       <li class="thumb">