]> git.plutz.net Git - serve0/blobdiff - actions/playctl.sh
extending cooperation functions
[serve0] / actions / playctl.sh
index 6944771f7cea4ac716fd7ef8efbc81ebd6cbd7e2..55997cad1af59a60c1fc4a4a2c5e1b46a2f4e58c 100755 (executable)
@@ -39,7 +39,7 @@ elif [ -n "${_POST[seek]+x}" ]; then
 elif [ -n "${_POST[pasink]+x}" ]; then
   stream="$(\
     pactl list sink-inputs \
-    | sed -rn '/Sink Input #/{:X;N;/application.name =/!bX;s;Sink Input #([0-9]+).+application.name = "MPlayer";\1;p}' \
+    | sed -rn '/Sink Input #/{:X;N;/application.name =/!bX;s;Sink Input #([0-9]+).+application.name = "(MPlayer|mplayer2)";\1;p}' \
   )"
   pactl move-sink-input "$stream" "${_POST[pasink]}"
 elif [ -n "${_POST[osd]+x}" ]; then
@@ -48,4 +48,4 @@ elif [ -n "${_POST[osd]+x}" ]; then
   esac >"$fifofile"
 fi &
 
-redirect "$HTTP_REFERER"
+redirect "${_POST[referrer]}"