![]() |
MoOde API available ? - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: MoOde API available ? (/showthread.php?tid=924) |
MoOde API available ? - UpsiUps - 01-20-2019 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 ? RE: MoOde API available ? - Tim Curtis - 01-20-2019 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 RE: MoOde API available ? - UpsiUps - 01-20-2019 (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. 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 RE: MoOde API available ? - UpsiUps - 01-31-2019 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 ? RE: MoOde API available ? - Tim Curtis - 01-31-2019 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 RE: MoOde API available ? - UpsiUps - 02-01-2019 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 ![]() RE: MoOde API available ? - Tim Curtis - 02-01-2019 The difference is that OEM software is read-only and can't be modified. |