make tremendous

This commit is contained in:
2025-12-17 20:33:32 -08:00
parent 863007779f
commit 56383af741

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
# quit if another instance is already running
[ -z $(pidof mpd-monitor) ] && echo "mpd-monitor already running";exit
ID=$(mpc current -f %id% ) ID=$(mpc current -f %id% )
mpc idleloop | mpc idleloop |
while read -r event; do while read -r event; do
@ -7,7 +10,7 @@ mpc idleloop |
# get current id to compare to init id # get current id to compare to init id
NEW_ID=$(mpc current -f %id%) NEW_ID=$(mpc current -f %id%)
# if a player even is output, but the track has not changed, skip rest of loop # if a player event is output, but the track has not changed, skip rest of loop
[ "$NEW_ID" != "$ID" ] || continue [ "$NEW_ID" != "$ID" ] || continue
ID=$NEW_ID ID=$NEW_ID