Trefort
Trefort

Reputation: 55

Controlling Spotify from another client

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:

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.

Upvotes: 1

Views: 593

Answers (1)

iKenndac
iKenndac

Reputation: 18776

At the moment the options you list are your only ones. You could write a Spotify app that communicates with your bot program via web sockets, though.

However, Spotify is releasing a HTTP/JSON API for playlists in the coming weeks, so you could hang fire and wait until that's released.

Upvotes: 1

Related Questions