From: paul Date: Sat, 5 Mar 2016 12:13:13 +0000 (+0000) Subject: bugfixes and visual fixes in player control X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=ede7b5bc5379c40a8351f3a01b8f4f2a52711d7d;p=serve0 bugfixes and visual fixes in player control svn path=/trunk/; revision=109 --- diff --git a/actions/playctl.sh b/actions/playctl.sh index 38cd54c..bda4d1b 100755 --- a/actions/playctl.sh +++ b/actions/playctl.sh @@ -29,6 +29,10 @@ elif [ -n "${_POST[ctl]+x}" ]; then printf '%s\n' $(validate "${_POST[ctl]}" "pause|stop" pause) >"$fifofile" elif [ -n "${_POST[seek]+x}" ]; then printf 'seek %s\n' $(validate "${_POST[seek]}" "[+-]?[0-9]+" 0) >"$fifofile" +elif [ -n "${_POST[osd]+x}" ]; then + case ${_POST[osd]} in + progression) printf "osd_show_progression\\n";; + esac >"$fifofile" fi & redirect "$HTTP_REFERER" diff --git a/pages/playctl.sh b/pages/playctl.sh index 143c4d9..015e7d3 100755 --- a/pages/playctl.sh +++ b/pages/playctl.sh @@ -25,15 +25,14 @@ 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")" -head -n1 "$meta" |read length width height x - -video="videos/$info" -[ -n "$info" ] && video="videos/$info" \ - || video="${location#/}" +if [ -n "$info" ]; then + video="${_DATA}/videos/$info" + meta="${_DATA}/meta/$info.meta" + tags="$(sed -n '2p' "$meta")" + description="$(sed -n '3,$p' "$meta")" + head -n1 "$meta" |read length width height x +else + video="${treeroot%/}/${location#/}" +fi volume=$(validate "$(cat "$_DATA/mplayer.volume")" '[1-9]?[0-9]|100' 20) diff --git a/templates/common.css.sh b/templates/common.css.sh index 8c7e2d8..3ab8870 100755 --- a/templates/common.css.sh +++ b/templates/common.css.sh @@ -290,10 +290,13 @@ a.panel { } .panel#preferences > input { display: block; } +#videoview h1, +#playctl h1 { font-size: 1.25em;} #videoview h1, #videoview > a, #playctl h1, #playctl > a { display: inline-block; margin-right: 1em; + padding: 0; margin: .5em 0; } #videoview video { display: block; diff --git a/templates/playctl.html.sh b/templates/playctl.html.sh index 339644d..e1e2dfc 100755 --- a/templates/playctl.html.sh +++ b/templates/playctl.html.sh @@ -56,6 +56,8 @@ cat < ' "$([ "$volume" = "$n" ] && printf selected)" "$n" done) +
+ $(($length / 60)):$(($length % 60)) min