Thank you for your donation!


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


Spotify playing now
#21
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.
Reply
#22
(03-26-2021, 06:31 PM)m_g_s_g Wrote: 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.

Hey m_g_s_g! I followied this thread with much anticipation when you were posting initially as it sounded like you were making good progress towards the goal of displaying the Spotify metadata on a local Moode display. Alas, it seems you have gone quiet since this post but I am clinging onto the hope that you are going to crack it any day now and post a set of easy instructions for this non-tech to implement on my Raspdac Mini LCD. Would appreciate an update whenever you get a chance.
Reply


Forum Jump: