jarvis icon indicating copy to clipboard operation
jarvis copied to clipboard

Spotify provider

Open pardahlman opened this issue 7 years ago • 1 comments

Wouldn't it be cool if Jarvis would have a provider that would search Spotify, and who's Execute action would trigger the Spotify application to play the matching song/album/playlist? In the simplest form, it would be something like

spotify living on a prayer

I haven't looked at Spotify API much, but there are one or two OSS projects that uses it that might be used straight of or used for inspiration.

There are som issues from the top of my mind:

  • Authentication/Authorization - I believe all calls to the API requires an access token. The access token can be provided through one of three authorization flows, I think the implicit flow is the only one applicable here as it otherwise would compromise client secret. There might be some work getting the UX right, as the provider would need to prompt the user to authorize Jarvis (at least once).
  • Not sure how to trigger the song to actually start playing. Spotify has registered the schema spotify and I think that the Spotify URI can be used. (Update: I think it should be possible to use the play endpoint which I think would work even if the user listens through a different device)

What do you think?

pardahlman avatar Jan 01 '18 12:01 pardahlman

You could probably look at the VS Spotify Remote for some tips on interfacing with Spotify: https://github.com/arjankuijpers/SpotifyRemote

henriksen avatar Jan 03 '18 11:01 henriksen