]> git.plutz.net Git - serve0/commitdiff
switch to mplayer2 again
authorpaul <paul@plutz.net>
Wed, 12 Oct 2016 09:31:16 +0000 (09:31 +0000)
committerpaul <paul@plutz.net>
Wed, 12 Oct 2016 09:31:16 +0000 (09:31 +0000)
svn path=/trunk/; revision=151

actions/playctl.sh
actions/watch.sh

index 6944771f7cea4ac716fd7ef8efbc81ebd6cbd7e2..1fd907b4e7730993916e5a6b38e177aca4f06b23 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
index 913e621374a33bd0301c25b07ec4cf2c73dc3962..7db9c645db6b1ea6aaf5fd57898effc7e53f36d5 100755 (executable)
@@ -77,17 +77,17 @@ case "${_COOKIE[watch]}" in
     export XDG_RUNTIME_DIR="/run/user/$uid"  # required for Pulseaudio
     xrandr >/dev/null  # helps enable all screens
 
-    nohup /usr/bin/mplayer -ao pulse \
-      -slave -input file="$fifofile" \
-      -volume "$volume" \
-      "$playuri" >"$statusfile" 2>/dev/null &
-
-    # # MPlayer2:
     # nohup /usr/bin/mplayer -ao pulse \
-    #   --slave --input=file="$fifofile" \
-    #   --volume="$volume" \
+    #   -slave -input file="$fifofile" \
+    #   -volume "$volume" \
     #   "$playuri" >"$statusfile" 2>/dev/null &
 
+    # MPlayer2: (statusline on stderr)
+    nohup /usr/bin/mplayer -ao pulse \
+      --slave --input=file="$fifofile" \
+      --volume="$volume" \
+      "$playuri" 2>"$statusfile" >/dev/null &
+
     chmod 600 "$statusfile"
 
     redirect "?p=playctl&${watch_link}"