I'm trying to write an IRC bot in java that can process song requests from other people, basically just adding spotify songs to my Spotify client's playlist. The problem I'm facing is, that I don't really know, how to make a connection between my bot and the Spotify client. What I have found so far:
- Spotify apps would be perfect, but I don't think there is a way to manage the communication between my bot and the app.
- Libspotify could work, but with it I can just only make a standalone client using the Spotify service, and is not really what I'm looking for.
- Spotify Widgets (WEB) has very limited options, I can't add a song to a playlist with it.
The best I got now is the code below. I can open it in with my bot, which gives a trackset to my Spotify client, what I can start manually.
spotify:trackset:PlaylistName:49MsPNQCOmxvIYi9AdoPzY,6fUlrsHaz4QfCNF31rk2dU,5KiTsR2h8jnzkvTeucxoAn
Not so elegant but it works fine, until it runs out of songs, because when I add a new song to the list (extend the list above with the new song URI, then open the whole link again), it will open a new playlist, but the Spotify client would play the old trackset until I manually start the new one.
Thanks for the answers.