bugfix: mpv socket accessible and silence mpv output

This commit is contained in:
2026-05-20 13:52:30 +02:00
parent ed12cef7e4
commit 94321c452c
+2 -1
View File
@@ -78,8 +78,9 @@ mpv_quit() {
# Start an mpv instance and bind it to the socket `MPV_SOCKET` # Start an mpv instance and bind it to the socket `MPV_SOCKET`
mpv_start() { mpv_start() {
MPV_SOCKET="$(mktemp --suffix=.sock)" MPV_SOCKET="$(mktemp --suffix=.sock)"
export MPV_SOCKET
trap 'mpv_quit >/dev/null; rm -f "$MPV_SOCKET"' EXIT INT trap 'mpv_quit >/dev/null; rm -f "$MPV_SOCKET"' EXIT INT
$MPV --no-config --no-terminal --input-ipc-server="$MPV_SOCKET" --idle --no-osc --no-input-default-bindings & nohup $MPV --no-config --no-terminal --input-ipc-server="$MPV_SOCKET" --idle --no-osc --no-input-default-bindings >/dev/null 2&>1 &
} }
# Play the track at the specified index in the playlist # Play the track at the specified index in the playlist