12-06-2018, 02:18 PM
The librespot project is actively being worked on so eventually the bug will be fixed which is why at the moment I'm not planning to invest time to code some sort of watchdog for it into moOde.
But if someone wants to give it a try then here is some useful information.
librespot is started by moOde in /var/www/inc/playerlib.php function startSpotify(). This function reads the values in the sql table cfg_spotify and then composes the command string. A "restart" script would need to be written in PHP and include playerlib.php. Then it just calls startSpotify().
The watchdog part would be added to the existing /var/www/command/watchdog.sh script. The code block would be similar to the MPD restart block.
But if someone wants to give it a try then here is some useful information.
librespot is started by moOde in /var/www/inc/playerlib.php function startSpotify(). This function reads the values in the sql table cfg_spotify and then composes the command string. A "restart" script would need to be written in PHP and include playerlib.php. Then it just calls startSpotify().
The watchdog part would be added to the existing /var/www/command/watchdog.sh script. The code block would be similar to the MPD restart block.