Mac::iTunes::Library::Item - Perl extension for representing an item (song, URL, video) within an iTunes library.
use Mac::iTunes::Library::Item; my $item = Mac::iTunes::Library::Item->new( 'Track ID' => 1, 'Name' => 'The Fooiest Song', 'Artist' => 'The Bar Band', ); $item->genre('Ska'); print "We are the " . $item->artist() . " and we play " . $item->genre() . " music\n"; print "Enjoy our hit song " . $item->name() . "\n";
A data structure for representing an item (song, URL, video) within an iTunes library. Use this along with Mac::iTunes::Library to create an iTunes library from which other information can be gleaned.
None by default.
Creates a new Mac::iTunes::Library::Item object that can store all of the data of an iTunes library item.
my $rec = Mac::iTunes::Library::Item->new();
The constructor can also be called initializing any number of the attributes of an item
my $rec = Mac::iTunes::Library::Item->new( 'Track ID' => '73', 'Name' => 'Josie', 'Artist' => 'blink-182', 'Album Artist' => 'blink-182', 'Composer' => 'blink-182', 'Album' => 'Dude Ranch', 'Grouping' => 'Alternative Rock, 00s Rock' 'Genre' => 'Pop Punk', 'Kind' => 'MPEG audio file', 'Size' => 31337, 'Total Time' => 31337, 'Year' => '2007', 'Date Modified' => '2007-01-01T01:01:01Z', 'Date Added' => '2007-01-01T01:01:01Z', 'Bit Rate' => 256, 'Sample Rate' => 44100, 'Play Count' => 1, 'Play Date' => -1167613261, 'Play Date UTC' => '2007-01-01T01:01:01Z', 'Skip Count' => 1, 'Skip Count UTC' => '2007-01-01T01:01:01Z', 'Rating' => 50, 'Album Rating' => 50, 'Album Rating Computed' => 1, 'Compilation' => 1, 'Persistent ID' => 'DAC2FC501CCA2031', 'Track Type' => 'File', 'Location' => 'file://localhost/Users/dinomite/Music/blink-182/Dude%20Ranch/Josie.mp3', 'File Folder Count' => 4, 'Library Folder Count' => 1 );
Get/set the Track ID attribute for this item.
Get/set the Artist attribute for this item.
Get/set the Album Artist attribute for this item.
Get/set the Composer attribute for this item.
Get/set the Album attribute for this item.
Get/set the Grouping attribute for this item.
Note: Grouping is intended to be used as a collection of music items below the level of an album (such as on a classical music release) where items are individual movements of a larger work. They are more commonly used as a comma delimited list of tags to build smart playlists.
Get/set the Genre attribute for this item.
Get/set the Kind ("MPEG audio file", etc.) attribute for this item.
Get/set the Size attribute for this item.
Get/set the Total Time attribute for this item.
Get/set the Year attribute for this item.
Get/set the Date Modified attribute for this item.
Get/set the Date Added attribute for this item.
Get/set the Comments attribute for this item.
Get/set the Sample Rate attribute for this item.
Get/set the Play Count attribute for this item.
Get/set the Play Date attribute for this item.
Get/set the Play Date UTC attribute for this item.
Get/set the Release Date attribute for this item.
Get/set the Skip Count attribute for this item.
Get/set the Skip Date attribute for this item.
Get/set the Rating attribute for this item.
Get/set the Album Rating attribute for this item.
Get/set the Album Rating Computed attribute for this item.
Get/set the Compilation attribute for this item.
Get/set the Persistent ID attribute for this item.
Get/set the Track Type attribute for this item.
Get/set the iTunesU attribute for this item.
Get/set the Location attribute for this item.
Get/set the File Folder Count attribute for this item.
Get/set the Library Folder Count attribute for this item.
Get/set the Track Count attribute for this item.
Get/set the Track Number attribute for this item.
Mac::iTunes::Library, Mac::iTunes::Library::Playlist, Mac::iTunes::Library::XML
Drew Stephens <drew@dinomite.net>, http://dinomite.net
Mark Allen <mrallen1@yahoo.com>
Michael G Schwern <mschwern@cpan.org>
David Rostcheck <davidr@thisisdavidr.net>
http://mac-itunes.googlecode.com
$Revision: 90 $
Copyright (C) 2007-2008 by Drew Stephens
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Mac::iTunes::Library, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::iTunes::Library
CPAN shell
perl -MCPAN -e shell install Mac::iTunes::Library
For more information on module installation, please visit the detailed CPAN module installation guide.