Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (21 sloc) 894 Bytes

Access iTunes with MacRuby through Scripting Bridge

Prerequisites: MacRuby

Example usage:

# start playing at the beginning

ITunesManager.player_state  #=> :playing
ITunesManager.player_state  #=> :paused

track = ITunesManager.current_track

# for more properties, see iTunes.h under "@interface iTunesTrack"

# playlist management
favorites = ITunesManager.find_or_create_playlist 'Favorites'

track =
favorites << track

favorites.add'daft punk')
favorites.add'pendulum', :artists)
favorites.add'easy rider', :albums)