From e56b8c3170dad62df6bc30386c319068f510d39d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sun, 7 Jan 2024 03:16:31 +0100 Subject: [PATCH] list alternative file types in group view --- view.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/view.sh b/view.sh index 5263e2c..7c73592 100755 --- a/view.sh +++ b/view.sh @@ -30,8 +30,10 @@ printf 'Content-Type: text/html;charset=utf-8\r\n\r\n' [input type=hidden id=StereoDist name=StereoDist value="$(COOKIE StereoDist |grep -xE '[0-9]+' || printf 32)"] [video #mainvideo controls="controls" preload="auto" [source src="?a=download" type="video/mp4"]] [a "?a=download" Download] - [a "javascript:stereoview(180, document.getElementById("mainvideo"));" View 180° Stereoscopic] - [a "javascript:stereoview(360, document.getElementById("mainvideo"));" View 360° Stereoscopic] + [label Stereoscopic View:] + [a "javascript:stereoview('sbs180', document.getElementById("mainvideo"));" SBS 180°] + [a "javascript:stereoview( 'tb360', document.getElementById("mainvideo"));" Top/Bottom 360°] + [a "javascript:stereoview( 'cu360', document.getElementById("mainvideo"));" Cubic 360°] [h1 . $(HTML "${ITEM##*/}" |sed -E 's;[^0-9a-zA-Z&#];&[wbr];g')] [span .time $((META_LENGTH / 60)):$(printf %02i $((META_LENGTH % 60)))min] [span .dim ${META_WIDTH}x${META_HEIGHT}] EOF @@ -44,8 +46,7 @@ printf 'Content-Type: text/html;charset=utf-8\r\n\r\n' list_meta "$_DATA/${ITEM%/*}/.index/meta" \ | grep -F "${CR} ${META_GROUP}" \ | sort -n -k8 -k6,6 \ - | while read_meta; do - file="$(printf %s\\n "$_DATA/${META_NAME}".*)" + | while read_meta; do for file in "$_DATA/${META_NAME}".*; do [ "/${file#${_DATA}/}" = "$ITEM" ] && continue name="$(HTML "/${file#${_DATA}/}")" @@ -60,7 +61,7 @@ printf 'Content-Type: text/html;charset=utf-8\r\n\r\n' | sed -r 's;^;,;; s;,+;,;g; s;,$;;; :X s;,-?([^,]+)(,|$); [span .tag\n \1]\2;; tX;' )" - done + done; done printf ']' fi -- 2.39.2