From 880ff478f3b3fc0c9c0e42d79f94bc7f19cccb06 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Thu, 31 Oct 2024 16:52:57 -0400 Subject: [PATCH] hvmpd.sh: replace toggle with play/stop "mpc toggle" will pause the stream if playing, but resuming doesn't always work if the server closes the connection. Replace by play/stop commands. --- recipes-multimedia/hvmpd-manager/files/hvmpd.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes-multimedia/hvmpd-manager/files/hvmpd.sh b/recipes-multimedia/hvmpd-manager/files/hvmpd.sh index 32bf889..a83bbcd 100644 --- a/recipes-multimedia/hvmpd-manager/files/hvmpd.sh +++ b/recipes-multimedia/hvmpd-manager/files/hvmpd.sh @@ -40,7 +40,12 @@ keys_manager() { if [ "${play_prev}" != "${play}" -a ${play} -eq 0 ]; then log_info "mpc toggle" - mpc toggle 1> /dev/null + + if is_mpc_playing ; then + mpc stop 1> /dev/null + else + mpc play 1> /dev/null + fi fi play_prev=${play} -- 2.20.1