NAME
Mac::iTunes::Library::Item - Perl extension for representing an item (song, URL, video) within an iTunes library.
SYNOPSIS
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";
DESCRIPTION
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.
EXPORT
None by default.
METHODS
- new()
-
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', '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', 'Rating' => 50, '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 );
- trackID( $id )
-
Get/set the Track ID attribute for this item.
- artist( $artist )
-
Get/set the Artist attribute for this item.
- genre( $genre )
-
Get/set the Genre attribute for this item.
- kind( $kind )
-
Get/set the Kind ("MPEG audio file", etc.) attribute for this item.
- size( $size )
-
Get/set the Size attribute for this item.
- totalTime( $totalTime )
-
Get/set the Total Time attribute for this item.
- year( $year )
-
Get/set the Year attribute for this item.
- dateModified( $dateModified )
-
Get/set the Date Modified attribute for this item.
- dateAdded( $dateAdded )
-
Get/set the Date Added attribute for this item.
- dateAdded( $dateAdded )
-
Get/set the Date Added attribute for this item.
- sampleRate( $sampleRate )
-
Get/set the Sample Rate attribute for this item.
- playCount( $playCount )
-
Get/set the Play Count attribute for this item.
- playDate( $playDate )
-
Get/set the Play Date attribute for this item.
- playDateUTC( $playDateUTC )
-
Get/set the Play Date UTC attribute for this item.
- rating( $rating )
-
Get/set the Rating attribute for this item.
- persistentID( $persistentID )
-
Get/set the Persistent ID attribute for this item.
- trackType( $trackType )
-
Get/set the Track Type attribute for this item.
- location( $location )
-
Get/set the Location attribute for this item.
- fileFolderCount( $fileFolderCount )
-
Get/set the File Folder Count attribute for this item.
- libraryFolderCount( $libraryFolderCount )
-
Get/set the Library Folder Count attribute for this item.
SEE ALSO
Mac::iTunes::Library, Mac::iTunes::Library::Playlist, Mac::iTunes::Library::XML
AUTHOR
Drew Stephens <drewgstephens@gmail.com>, http://dinomite.net
SVN INFO
$Revision: 54 $ $Date: 2008-08-05 23:51:26 -0700 (Tue, 05 Aug 2008) $ $Author: drewgstephens $
COPYRIGHT AND LICENSE
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.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 560:
You forgot a '=back' before '=head1'