]> git.plutz.net Git - serve0/blobdiff - actions/playctl.sh
increased response times
[serve0] / actions / playctl.sh
index 38cd54ccdbc8b714a71c085cdae1404bb3a15184..183bee6fe0cb2ff6d1acc12ce41cdfd564801a6a 100755 (executable)
 # along with Serve0  If not, see <http://www.gnu.org/licenses/>.
 
 fifofile="${_DATA}/mplayer.fifo"
+statusfile="${_DATA}/mplayer.status"
 volfile="${_DATA}/mplayer.volume"
 
+printf '\rBREAK\r' >> "$statusfile"
+
 if   [ -n "${_POST[amp]+x}" ]; then
   amp $(validate "${_POST[amp]}" '(on|off)' off)
 elif [ -n "${_POST[vol]+x}" ]; then
@@ -29,6 +32,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"