03-26-2021, 06:31 PM
Hi.
I have modified the code to use a separated page (no need to touch engine-mpd.php). I've uploaded the changes to the nowplaying feature branch of my fork. Before asking for a PR, I will test it for some time.
I've "reimagined" the code as a plugin (called metaspot), moving all changes to a separate /plugins/metaspot directory. Separate scripts exist to install, uninstall, start, stop the "plugin" (metaspot-plugin-install.sh, metaspot-plugin-start.php,...), as well as a running daemon (metaspot-plugin-daemon.php).
Only this core moOde files will need some changes:
- playerlib.php (to start vollibrespot + the plugin daemon, instead of librespot)
- spo-config.* (to allow for clean activation/deactivation of this plugin through the existing config screen)
- worker.php (I don't know why it directly kills librespot instead of calling playerlib/stopSpotify()).
To autoload the new "renderer now playing page" (metaspot-plugin-ui.php), playerlib.js would have to be changed as well, but for me this is tricky (because of minified js - never used gulp before). For now, I can live loading this page myself.
To avoid cluttering this thread, I will open a fresh one to follow up.
I have modified the code to use a separated page (no need to touch engine-mpd.php). I've uploaded the changes to the nowplaying feature branch of my fork. Before asking for a PR, I will test it for some time.
I've "reimagined" the code as a plugin (called metaspot), moving all changes to a separate /plugins/metaspot directory. Separate scripts exist to install, uninstall, start, stop the "plugin" (metaspot-plugin-install.sh, metaspot-plugin-start.php,...), as well as a running daemon (metaspot-plugin-daemon.php).
Only this core moOde files will need some changes:
- playerlib.php (to start vollibrespot + the plugin daemon, instead of librespot)
- spo-config.* (to allow for clean activation/deactivation of this plugin through the existing config screen)
- worker.php (I don't know why it directly kills librespot instead of calling playerlib/stopSpotify()).
To autoload the new "renderer now playing page" (metaspot-plugin-ui.php), playerlib.js would have to be changed as well, but for me this is tricky (because of minified js - never used gulp before). For now, I can live loading this page myself.
To avoid cluttering this thread, I will open a fresh one to follow up.