diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-07-26 21:52:18 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-07-26 21:52:18 +0800 |
| commit | b5b8e7c7c79c9f0e8cc8ac3820f3211f3c78ddf0 (patch) | |
| tree | bf98e4f6d0de0215027ba63385e511a9b01383b7 | |
| parent | 3819497e3980df25f0490828fadc058010176c33 (diff) | |
logic update
| -rwxr-xr-x | audio-autoAdjust.sh | 10 |
1 files 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 |
