X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=pages%2Fview.sh;fp=pages%2Fview.sh;h=0000000000000000000000000000000000000000;hb=dfdfcfb7ac57a823e639a19d268436753385cbed;hp=fef4f780a8066c5d203df769748b4aead5cc8bf5;hpb=d716f2ce1fe64cf87f777490315bc51906001c72;p=serve0 diff --git a/pages/view.sh b/pages/view.sh deleted file mode 100755 index fef4f78..0000000 --- a/pages/view.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/zsh - -# Copyright 2014 2016 Paul Hänsch -# -# This file is part of Serve0. -# -# Serve0 is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Serve0 is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Serve0. If not, see . - -. $_EXEC/pages/common.sh - -info="${_GET[i]}" -location="$(invalidate "${_GET[l]}" '(.*/)?\.\.(/.*)?|' /)" -directory="${location%/*}" - -TITLE="$info" - -meta="${_DATA}/meta/$info.meta" -[ -n "$info" ] && video="${_DATA}/videos/$info" \ - || video="${treeroot%/}/${location#/}" -tags="$(sed -n '2p' "$meta")" -description="$(sed -n '3,$p' "$meta")" -length=0; width=0; height=0; - -debug "Analysing video: $video" -printf '' |mplayer -input nodefault-bindings -nosound -vo null -identify -frames 0 "$video" \ -| sort \ -| sed -rn 's:ID_LENGTH=(.*)(\..*)$:\1:p; - s:ID_VIDEO_HEIGHT=(.*):\1:p; - s:ID_VIDEO_WIDTH=(.*):\1:p;' \ -| tr '\n' ' ' \ -| read length height width 2>/dev/null - -video="videos/$info" -[ -n "$info" ] && video="videos/$info" \ - || video="${location#/}"