Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Access iTunes with MacRuby through Scripting Bridge
C Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
iTunes.bridgesupport
iTunes.h
itunes.rb

README.md

Access iTunes with MacRuby through Scripting Bridge

Prerequisites: MacRuby

Example usage:

ITunesManager.app.run

# start playing at the beginning
ITunesManager.music.playOnce(false)

ITunesManager.player_state  #=> :playing

ITunesManager.app.playpause
ITunesManager.player_state  #=> :paused

track = ITunesManager.current_track

# for more properties, see iTunes.h under "@interface iTunesTrack"
track.name
track.artist
track.album

# playlist management
favorites = ITunesManager.find_or_create_playlist 'Favorites'

track = ITunesManager.music.fileTracks.first
favorites << track

favorites.add ITunesManager.music.search('daft punk')
favorites.add ITunesManager.music.search('pendulum', :artists)
favorites.add ITunesManager.music.search('easy rider', :albums)
Something went wrong with that request. Please try again.