]> git.plutz.net Git - serve0/blobdiff - actions/watch.sh
time display for files from directory
[serve0] / actions / watch.sh
index b3463b9aac183627af0c1f04b700f6869e9661f7..3fae936a01491b525a3bbb26e0accc6684eea8b5 100755 (executable)
@@ -54,12 +54,18 @@ case "${_COOKIE[watch]}" in
     [ -n "$location" ] && playuri="${treeroot%/}/${location#/}"
     [ -n "$info" ]     && playuri="${_DATA}/videos/$info"
 
+    metafile="${_DATA}/meta/${info}.meta"
+
+    playmeta="${_DATA}/mplayer.meta"
     fifofile="${_DATA}/mplayer.fifo"
     statusfile="${_DATA}/mplayer.status"
     volume="$(validate "$(cat "${_DATA}/mplayer.volume")" '[1-9]?[0-9]|100' 20)"
     [ \! -p "$fifofile" ] && rm -f "$fifofile" && mkfifo -m 600 "$fifofile"
 
-    debug PLAYURI $playuri
+    debug PLAYURI "$playuri"
+
+    [ -f "$metafile" ] && cp "$metafile" "$playmeta" \
+                       || "${_EXEC}"/helpers/genmeta.sh "$playuri" "$playmeta" >/dev/null
 
     DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1006 \
       nohup /usr/bin/mplayer -ao pulse \