06-29-2025, 11:26 AM
(This post was last modified: 06-29-2025, 11:27 AM by Tim Curtis.)
Looking at the code in worker.php it appears that the auto-play block could be moved after the ready-script block but there are some complexities.
1. ready-script.sh can be user modified meaning there is no guarantee that its going to play the default ReadyChime.flac track or any chime at all. For example the script could be modified to turn on an Amp instead of playing a chime.
The program header from ready-script.sh
2. Auto-play uses the 'songid' tag from the MPD status block to determine what the last played item was. If the ready chime is played first then it becomes the last played item. This means that 'songid' has to first be saved to a temp variable before the chime is played.
3. How to determine whether ready-script.sh is going to play the chime? Prolly a new var in cfg_system table that can be set by ready-script.
4. If it's going to play the chime then some code needs to be added to wait for playback to complete before continuing on the auto-play block.
1. ready-script.sh can be user modified meaning there is no guarantee that its going to play the default ReadyChime.flac track or any chime at all. For example the script could be modified to turn on an Amp instead of playing a chime.
The program header from ready-script.sh
Code:
#
# To use this script for something other than the Default action
# add your own code below followed by an exit statement
#
#exit 0
#
# Default action is to play the "System Ready" chime
#
.
.
2. Auto-play uses the 'songid' tag from the MPD status block to determine what the last played item was. If the ready chime is played first then it becomes the last played item. This means that 'songid' has to first be saved to a temp variable before the chime is played.
3. How to determine whether ready-script.sh is going to play the chime? Prolly a new var in cfg_system table that can be set by ready-script.
4. If it's going to play the chime then some code needs to be added to wait for playback to complete before continuing on the auto-play block.