From d59b95791a1b6c94e2e83d9edc90314e572fcd5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 28 Aug 2018 18:46:44 +0200 Subject: [PATCH] improved time formatting --- list.sh | 2 +- view.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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"' -- 2.39.2