From: Hugo Villeneuve Date: Thu, 31 Oct 2024 20:52:57 +0000 (-0400) Subject: hvmpd.sh: replace toggle with play/stop X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=880ff478f3b3fc0c9c0e42d79f94bc7f19cccb06;p=yocto%2Fmeta-hvmpd.git 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. --- 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}