I want to write a small web app which does this things:
- deliver a web page to display the current song and some meta data
- provide a web api which can be queried for the next song to allow the page to update without page load
No big deal, the only part I can’t estimate is if it’s possible to access the current song of iTunes, TRAKTOR and if possible Cog from a ruby on rails application.
It would be especially nice if I can access the playlist, too to display the following song, too.
I would use applescript via the command-line. I don’t have Traktor Pro or Coq, but you can look at what objects are available via the AppleScript Dictionary viewer in OS X’s Script Editor. For iTunes, the command would be:
You would execute the command from your rails app (which would need to be running as your user account) like this:
…