From 0f55cabbc9beca8fce0bddc74f48d4d0fd52250b Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 20 Jun 2016 12:24:06 +0000 Subject: [PATCH] put statusfile into /tmp svn path=/trunk/; revision=135 --- actions/playctl.sh | 1 + actions/watch.sh | 3 +++ pages/playctl.sh | 1 + 3 files changed, 5 insertions(+) diff --git a/actions/playctl.sh b/actions/playctl.sh index 183bee6..b532e36 100755 --- a/actions/playctl.sh +++ b/actions/playctl.sh @@ -18,6 +18,7 @@ fifofile="${_DATA}/mplayer.fifo" statusfile="${_DATA}/mplayer.status" +statusfile="/tmp/mplayer.status" volfile="${_DATA}/mplayer.volume" printf '\rBREAK\r' >> "$statusfile" diff --git a/actions/watch.sh b/actions/watch.sh index 48f465f..e473ac4 100755 --- a/actions/watch.sh +++ b/actions/watch.sh @@ -59,6 +59,7 @@ case "${_COOKIE[watch]}" in playmeta="${_DATA}/mplayer.meta" fifofile="${_DATA}/mplayer.fifo" statusfile="${_DATA}/mplayer.status" + statusfile="/tmp/mplayer.status" volume="$(validate "$(cat "${_DATA}/mplayer.volume")" '[1-9]?[0-9]|100' 20)" [ \! -p "$fifofile" ] && rm -f "$fifofile" && mkfifo -m 600 "$fifofile" @@ -86,6 +87,8 @@ case "${_COOKIE[watch]}" in # --volume="$volume" \ # "$playuri" >"$statusfile" 2>/dev/null & + chmod 600 "$statusfile" + redirect "?p=playctl&${watch_link}" ;; *) redirect "?p=view&${watch_link}" diff --git a/pages/playctl.sh b/pages/playctl.sh index 79122fd..c57e338 100755 --- a/pages/playctl.sh +++ b/pages/playctl.sh @@ -23,6 +23,7 @@ info="${_GET[i]}" location="$(invalidate "${_GET[l]}" '(.*/)?\.\.(/.*)?|' /)" directory="${location%/*}" statusfile="$_DATA/mplayer.status" +statusfile="/tmp/mplayer.status" [ -n "$info" ] && video="${_DATA}/videos/$info" \ || video="${treeroot%/}/${location#/}" -- 2.39.2