Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Problem: [PROBLEM] 9.x: MPD crashing ad-hoc / stops playing
#68
All my stations (40+, I don't use the default moOde stations) are marked as being monitored, as I used to have drop-outs on all of them from time to time. Fact that almost all of them are flac hd stations may have to do something with that.

But your script is great! I've a SSH terminal running a tail -f on the /var/log/mpd/log, and I see your script kicks in from time to time, mostly with no hearable interruption. Also, resource consumption of your script is negligible.

Actually, I woke up at 4h30. Now it's 19h06, and the music keeps playing! Never had that experience! Not on moOde, and for sure not on Naim gear! Tx!

I combined both of your scripts in 1:

Code:
moode@moode:~ $ cat XRUN_restart.sh
#!/bin/bash
#XRUN_restart.sh - look for and attempt to recover from under-runs and timeouts in MPD.

while sleep 1;
do
       LASTLOG=$( tail -n 1 /var/log/mpd/log )
       STATUS=$(mpc status)
       if [[ $STATUS = *"playing"* && $LASTLOG = *"xrun"* ]];
       then
               # echo "xrun matched"
               mpc stop
               mpc play
       else
               LASTLOG=$( tail -n 2 /var/log/mpd/log )
               if [[  $STATUS != *"playing"* && $LASTLOG = *"timed out"* ]];
               then
                       # echo "timeout matched"
                       mpc play
               fi
       fi
done


Messages In This Thread
RE: [PROBLEM] 9.1.2: MPD crashing ad-hoc - by kurt1970 - 10-25-2024, 04:50 PM

Forum Jump: