]> git.plutz.net Git - serve0/blobdiff - actions/watch.sh
fix: accept one digit page size
[serve0] / actions / watch.sh
index 8f1a18d272a04ad3e22fb291e805bcf8a33f379a..39ca7e0cecd7833e28ec69c1937b7b54cd281aac 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/zsh
 
 cgi_refdata
-cgi_cookie
 info="${_GET[i]}"
 order="${_REF[o]}"
 search="${_REF[s]}"
@@ -47,6 +46,10 @@ case "${_COOKIE[watch]}" in
   download)
     redirect "$videourl"
   ;;
+  server)
+    DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1006 nohup /usr/bin/mplayer -ao pulse --quiet "${_DATA}/videos/$info" >/dev/null 2>/dev/null &
+    redirect "$HTTP_REFERER"
+  ;;
   *) redirect "?p=view&${watch_link}"
   ;;
 esac