Thank you for your donation!


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


MoOde API available ?
#1
I think I have seen the Installation description as the only description. Also have seen some How-To's in the section of the forum. I just wonder if there is an API description that describe the various "hook-up" possibilities you have in MoOde e.g. :

/var/local/www/commandw/wrkready.sh -> is called after first startup and ready
/var/local/www/commandw/spotevent.sh - seems to be called after a change from play<->stop ??
/var/local/www/currentsong.txt -> will change when a new song is played
/var/www/command/lcdup.sh -> called when song changed
....

So is there any description available ? Or a Wiki ?
Reply
#2
The scripts are self documenting, assuming the reader has a basic knowledge of BASH scripting and the components being manipulated by the scripts.

maint.sh - Executed every 6 hours by worker.php. Performs maintenance tasks e.g. clearing the logs
restart.sh - Executed when user selects Reboot or Shutdown from the UI
slpower.sh - Executed by Squeezelite renderer when LMS power button is clicked
spotevent.sh - Executed by Spotify renderer when librespot emits an event e.g. 'play', 'stop'
spspost.sh - Executed by shairport-sync (Airplay renderer) before playback is started
spspre.sh - Executed by shairport-sync after playback has been stopped
wrkready.sh - Executed by worker.php at the end of moOde startup sequence
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(01-20-2019, 05:39 PM)Tim Curtis Wrote: The scripts are self documenting, assuming the reader has a basic knowledge of BASH scripting and the components being manipulated by the scripts.

maint.sh - Executed every 6 hours by worker.php. Performs maintenance tasks e.g. clearing the logs
restart.sh - Executed when user selects Reboot or Shutdown from the UI
slpower.sh - Executed by Squeezelite renderer when LMS power button is clicked
spotevent.sh - Executed by Spotify renderer when librespot emits an event e.g. 'play', 'stop'
spspost.sh - Executed by shairport-sync (Airplay renderer) before playback is started
spspre.sh - Executed by shairport-sync after playback has been stopped
wrkready.sh - Executed by worker.php at the end of moOde startup sequence

Ahh - sh... spotevent.sh is only fired when using spotify ... I had the feeling that's the case. Anyhow - thanks for the description. I think that is useful to know
Reply
#4
I want to change some of the scripts to show informations on the attached LCD Display. While it will be not a huge effort, I wonder what will happen when I run the update to MoOde 4.5 ? Will the update backup modified files or just hard write over them ?
Reply
#5
In-place update replaces the entire /var/www directory and files in various other directories as required. It also makes changes to the SQL database as required.

It's not really feasible to be able to somehow detect and preserve user modifications to the software because the software may have evolved in ways that break user mods. Ultimately if you modify the software it's your responsibility to manage the mods.

If however any of the modifications are generally applicable then submit as a feature request and make the case for adding the mods to moOde :-)

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
Thanks for clarification. I agree it is an effort to review all touched files and backup them. You would also need a DB to store timestamps etc. I just wonder how OEM users handle that ? I am a true believer of regular updates to fix security holes, which sometimes also leed into trouble with former "hacks" that have been used for extensions.

Anyhow, not important - I will "rescue" my hacks before I do the update in the future Big Grin
Reply
#7
The difference is that OEM software is read-only and can't be modified.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: