]> git.plutz.net Git - serve0/blobdiff - pages/playctl.sh
bugfixes and visual fixes in player control
[serve0] / pages / playctl.sh
index 143c4d952c7f440e03383132e3ad5dfab064aca7..015e7d338d16d3678bb3042954c0817e1ece98c4 100755 (executable)
@@ -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)