bugfix: mpv text expansion

This commit is contained in:
2025-08-27 18:11:46 +02:00
parent 1463d292f2
commit 34628fc9b0

View File

@@ -5,22 +5,19 @@ SLEEP_ON_ERROR=1
export MB_BROWSE_STEPS export MB_BROWSE_STEPS
__mpv_command() { __mpv_command() {
echo "mpv_command: $*" >>/tmp/foo
printf "{ \"command\": [\"%s\"] }\n" "$1" | $SOCAT - "$MPV_SOCKET" printf "{ \"command\": [\"%s\"] }\n" "$1" | $SOCAT - "$MPV_SOCKET"
} }
__mpv_command_with_arg() { __mpv_command_with_arg() {
echo "mpv_command_1: $*" >>/tmp/foo
printf "{ \"command\": [\"%s\", \"%s\"] }\n" "$1" "$2" | $SOCAT - "$MPV_SOCKET" printf "{ \"command\": [\"%s\", \"%s\"] }\n" "$1" "$2" | $SOCAT - "$MPV_SOCKET"
} }
__mpv_command_with_args2() { __mpv_command_with_args2() {
echo "mpv_command_2: $*" >>/tmp/foo
printf "{ \"command\": [\"%s\", \"%s\", \"%s\"] }\n" "$1" "$2" "$3" | $SOCAT - "$MPV_SOCKET" printf "{ \"command\": [\"%s\", \"%s\", \"%s\"] }\n" "$1" "$2" "$3" | $SOCAT - "$MPV_SOCKET"
} }
__mpv_get() { __mpv_get() {
__mpv_command_with_arg "expand-text" "$2" | $JQ -r '.data' __mpv_command_with_arg "expand-text" "$1" | $JQ -r '.data'
} }
mpv_playlist_count() { mpv_playlist_count() {