From: Paul Hänsch Date: Tue, 28 Aug 2018 16:46:44 +0000 (+0200) Subject: improved time formatting X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d59b95791a1b6c94e2e83d9edc90314e572fcd5f;p=serve0 improved time formatting --- diff --git a/list.sh b/list.sh index f36fe67..a408af9 100644 --- a/list.sh +++ b/list.sh @@ -29,7 +29,7 @@ list_item() { name="$(HTML "$ITEM/$name")" printf '[div .list .file [a href="%s" [img src="%s?a=thumbnail"]][label %s] - [span .time %i:%imin] [span .dim %ix%i] %s + [span .time %i:%02imin] [span .dim %ix%i] %s [checkbox "select" "%s" id="select_%s"][label for="select_%s" +] ]' \ "$link" "$link" "${name##*/}" \ diff --git a/view.sh b/view.sh index 8854c48..c08be24 100644 --- a/view.sh +++ b/view.sh @@ -32,7 +32,7 @@ printf 'Content-Type: text/html;charset=utf-8\r\n\r\n' [a "javascript:stereoview(180, document.getElementById("mainvideo"));" View 180° Stereoscopic] [a "javascript:stereoview(360, document.getElementById("mainvideo"));" View 360° Stereoscopic] [video #mainvideo controls="controls" [source src="?a=download" type="video/mp4"]] - [span .time %i:%imin] [span .dim %ix%i] %s + [span .time %i:%02imin] [span .dim %ix%i] %s ' "$(HTML "${ITEM##*/}" |sed -r "$w_ascii"' s;[^0-9a-zA-Z&#];&[wbr];g')" \ "$((length / 60))" "$((length % 60))" "$width" "$height" \ "$(printf '%s\n' "${tags#tags=}" |sed -r "$UNSTRING"'