Thank you for your donation!


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


Spotify / Librespot - metadata retrieval POC
#13
Seems like thats the only way to do it other than their WebAPI but thats not compatible with Open Source license.
It would prolly break if they change the DOM for that website.

In any case here's an overall approach

- Spotify event script writes trackID to /tmp file
- PHP daemon polls the file for change in trackID (or use inotify in a BASH daemon)
---- If changed, scrape the website and cache the data somewhere
---- Send a message + data to the front-end via sendEngCmd()
- Front end receives the message + data and updates the WebUI (only for chromium/local display) with new metadata from the cache
- If page is refreshed re-load metadata from cache into WebUI

Something like that.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
RE: Spotify / Librespot - metadata retrieval POC - by Tim Curtis - 01-31-2024, 11:15 PM

Forum Jump: