From b5b8e7c7c79c9f0e8cc8ac3820f3211f3c78ddf0 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 26 Jul 2024 21:52:18 +0800 Subject: logic update --- audio-autoAdjust.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/audio-autoAdjust.sh b/audio-autoAdjust.sh index 75fa921..ff20080 100755 --- a/audio-autoAdjust.sh +++ b/audio-autoAdjust.sh @@ -38,10 +38,12 @@ if [ "$1" ]; then echo VideoDetected lower_music fi - elif [[ $(playerctl status -p spotify) == "Playing" ]] && [ $STATE -eq 1 ]; then - STATE=0 - echo VideoGone - normal_music + elif [[ $(playerctl status -p spotify) == "Playing" ]]; then + if [ $STATE -eq 1 ]; then + STATE=0 + echo VideoGone + normal_music + fi else sleep 5 fi -- cgit v1.2.3