2

I'm looking for a way to star a song in Spotify without having to go to the app itself.

For instance: I'm playing a game on fullscreen, or I'm working on something and Spotify is on for music. I hear a great song and I want to star it.

Now instead of going to the app, I want to star the song using a shortcut or a dedicated external button.

Whether it is a shortcut, a USB button, or a button on a remote, I believe this function would be really helpful. I've searched through the Spotify core API, but I couldn't find anything that enables me to "star" a song.

Any ideas?

Bart
  • 19,692
  • 7
  • 68
  • 77

1 Answers1

2

Since you tagged CocoaLibSpotify in this question, well, CocoaLibSpotify has this functionality built right in - the SPTrack object has the starred property. It'd be fairly simple to write a little app that, when triggered, fetches the currently playing track using the Spotify client's AppleScript bridge and use CocoaLibSpotify to star it.

Alternatively, the Apps API can star a track as well (the Track object has the starred property). You could use the player object to get the current track and star it. However, linking that to an external button will be tricky. One (hacky) way would be to have the button trigger a system URL launch of spotify:app:star-this-track:invocation:1 where the number at the end increments each time you push the button. Then, the application's ARGUMENTSCHANGED event will fire, at which point you can star the track.

iKenndac
  • 18,730
  • 3
  • 35
  • 51