]> git.plutz.net Git - serve0/blobdiff - pages/view.sh
styling for pagination links
[serve0] / pages / view.sh
index 689d6c1e3f8c8f2fc3ddb068dfbb7130c74db0ba..fef4f780a8066c5d203df769748b4aead5cc8bf5 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/zsh
 
-# Copyright 2014 2016 Paul Hänsch
+# Copyright 2014 2016 Paul Hänsch
 #
 # This file is part of Serve0.
 # 
@@ -23,6 +23,8 @@ 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#/}"
@@ -31,7 +33,7 @@ description="$(sed -n '3,$p' "$meta")"
 length=0; width=0; height=0;
 
 debug "Analysing video: $video"
-echo '' |mplayer -input nodefault-bindings -nosound -vo null -identify -frames 0 "$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;