From dee510eeafc877736c968f16651646f671a39245 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 21 Dec 2021 21:00:21 +0100 Subject: [PATCH] show group listings in video view --- style.css | 4 ++++ view.sh | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/style.css b/style.css index 391a6da..7f6f2bb 100644 --- a/style.css +++ b/style.css @@ -277,6 +277,10 @@ body#view .tag { border-radius: 1pt; } +body#view .itemlist { + margin-top: 2em; +} + /* ====== SCALE BLOCK ELEMENTS ====== */ diff --git a/view.sh b/view.sh index 094337e..1566a82 100755 --- a/view.sh +++ b/view.sh @@ -36,6 +36,31 @@ printf 'Content-Type: text/html;charset=utf-8\r\n\r\n' printf %s\\n "$META_TAGS" |tr , \\n |while read tag; do [ "$tag" ] && printf ' [span .tag . %s]\n' "$(HTML "${tag#-}")" done + + if [ "${META_GROUP}" ]; then + printf '[div .itemlist' + list_meta "$_DATA/${ITEM%/*}/.index/meta" \ + | grep -F "${CR} ${META_GROUP}" \ + | while read_meta; do + file="$(printf %s\\n "$_DATA/${META_NAME}".*)" + [ "/${file#${_DATA}/}" = "$ITEM" ] && continue + name="$(HTML "/${file#${_DATA}/}")" + + printf '[div .list .file + [a href="%s" [img src="%s?a=thumbnail"]][label . %s] + [span .time %i:%02imin] [span .dim %ix%i] %s + ]' \ + "$name" "$name" "${name##/}" \ + "$((META_LENGTH / 60))" "$((META_LENGTH % 60))" \ + "$META_WIDTH" "$META_HEIGHT" \ + "$(printf %s\\n "${META_TAGS}" \ + | sed -r 's;^;,;; s;,+;,;g; s;,$;;; + :X s;,-?([^,]+)(,|$); [span .tag\n \1]\2;; tX;' + )" + done + printf ']' + fi + printf ' [div #editing [form method=POST action="/?a=multitag" -- 2.39.2