Hello every one,
I'm working on a new way to get songs artwork.
The reasons are :
Well, for this I'm thinking about editing the "5-Minute Sync Check Media Folders" cron job to call a small service with the song title. It will get a response with a image and i'm wondering if it'll be possible to add it as a 'Custom Fields '.
I'm asking about how it can be done and he best way to integrated into Azuracast.
(once it is done, the repo we'll be available for everyone )
Best,
I've had a theory of creating a spotify azura plugin, that would trigger everytime a song is played, check if it has been played before, if not would check spotify API for album art and update it.
I believe i've seen in previous issues that 3rd party intergration wouldnt be brought into the project unless it was open source.
https://github.com/AzuraCast/AzuraCast/issues/102
Currently it wouldn't be possible to supply custom album artwork during the NowPlaying process, as there's no dispatched event that lets you modify the composed Entity\Api\NowPlaying object.
It would be rather trivial for us to add a new dispatched event that lets you modify the composed NowPlaying API object (which would include providing a different album art URL and possibly modifying any of a number of other aspects) before it's sent to the rest of the system (i.e. dispatched via webhooks, used to update the actual Now Playing API, etc).
Thank you for your answers.
Taking in account what you said :
I was thinking about two solutions :
1- Add a task to the cron job 5-Minute Sync to call a microservice that gives back an artwork based on the song title ( no matter the API service provider ) then update the cover art of the song ( API or directly DB )
2- A microservice that process all songs in the DB with the help of the Azura API. Then for each item it will request an external API to get more information ( Art, lyrics etc... ) then push them back to the songs using the Azura API .
For both solution the provider ( Last.fm, Spotify or Deezer ....) API-key is external from the distributed project and it could be integrated with .env variable. So this way it's up to the user to get his one key.
Most helpful comment
Thank you for your answers.
Taking in account what you said :
I was thinking about two solutions :
1- Add a task to the cron job
5-Minute Syncto call a microservice that gives back an artwork based on the song title ( no matter the API service provider ) then update the cover art of the song ( API or directly DB )2- A microservice that process all songs in the DB with the help of the Azura API. Then for each item it will request an external API to get more information ( Art, lyrics etc... ) then push them back to the songs using the Azura API .
For both solution the provider ( Last.fm, Spotify or Deezer ....) API-key is external from the distributed project and it could be integrated with .env variable. So this way it's up to the user to get his one key.