The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mac::iTunes -

SYNOPSIS

DESCRIPTION

METHODS

new()

Creates a new Mac::iTunes object. If you specify a filename argument the object uses that file as the iTunes Music Library to initialize the object, otherwise the object is empty (so you can build a new library).

Returns false on failure.

controller()

Creates a new Mac::iTunes controller object. See Mac::iTunes::Applescript for methods.

preferences( [ FILENAME ]
playlists

In list context, returns a list of the titles of the playlists. In scalar context, returns the number of playlists.

get_playlist( PLAYLIST )

Takes a playlist title argument.

Extracts a Mac::Playlist object from the music library. Returns false if the playlist does not exist.

add_playlist( OBJECT )

Takes a Mac::iTunes::Playlist objext as its only argument.

Adds the playlist to the music library.

delete_playlist( PLAYLIST | OBJECT )

Takes a playlist title or Mac::iTunes::Playlist object as an argument.

Removes the playlist from the music library.

playlist_exists( PLAYLIST | OBJECT )

Takes a playlist title or Mac::iTunes::Playlist object as an argument.

Returns true if the playlist exists in the music library, and false otherwise.

The playlist exists if the music library has a playlist with the same title, or if the object matches another object in the music library. See Mac::iTunes::Playlist to see how one playlist object may match another.

NOTE: at the moment, if you use an object argument, the function extracts the title of the playlist and sees if that title is in the library. this is just a placeholder until i come up with something better.

read( FILENAME )

Reads the named iTunes Music Library file and uses it to form the music library object, replacing any other data already in the object.

merge( FILENAME | OBJECT )

Merges the current music library with the one in the named file or Mac::iTunes object. Does not affect the object argument.

write

Returns the music library as a string suitable for an iTunes Music Object file.

TO DO

* everything - the list of things already done is much shorter.

BUGS

AUTHOR

brian d foy, <bdfoy@cpan.org>

COPYRIGHT

Copyright 2002, brian d foy, All rights reserved

You may redistribute this under the same terms as Perl.