Skip Menu |

This queue is for tickets about the Mac-iTunes-Library CPAN distribution.

Report information
The Basics
Id: 53553
Status: resolved
Priority: 0/
Queue: Mac-iTunes-Library

People
Owner: Nobody in particular
Requestors: mrallen1 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Adding support for the Grouping element of the XML file.
Subject: itunes-item.patch
Index: Item.pm =================================================================== --- Item.pm (revision 78) +++ Item.pm (working copy) @@ -61,6 +61,7 @@ 'Album Artist' => 'blink-182', 'Composer' => 'blink-182', 'Album' => 'Dude Ranch', + 'Grouping' => 'Alternative Rock, 00s Rock' 'Genre' => 'Pop Punk', 'Kind' => 'MPEG audio file', 'Size' => 31337, @@ -100,6 +101,7 @@ 'Album Artist' => undef, 'Composer' => undef, 'Album' => undef, + 'Grouping' => undef, 'Genre' => undef, 'Kind' => undef, 'Size' => undef, @@ -137,6 +139,7 @@ elsif ($param eq 'Album Artist') { albumArtist($self, $params{'Album Artist'}) } elsif ($param eq 'Composer') { composer($self, $params{'Composer'}) } elsif ($param eq 'Album') { album($self, $params{'Album'}) } + elsif ($param eq 'Grouping') { grouping($self, $params{'Grouping'}) } elsif ($param eq 'Genre') { genre($self, $params{'Genre'}) } elsif ($param eq 'Kind') { kind($self, $params{'Kind'}) } elsif ($param eq 'Size') { size($self, $params{'Size'}) } @@ -276,6 +279,29 @@ return $self->{'Album'}; } #album +=head2 grouping( $grouping ) + +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. + +=cut + +sub grouping { + my $self = shift; + + if (@_) { + my $grouping = shift; + return carp "$grouping isn't a valid Grouping" unless ($grouping =~ /.*/); + $self->{'Grouping'} = $grouping; + } + + return $self->{'Grouping'}; +} #grouping + =head2 genre( $genre ) Get/set the Genre attribute for this item.
Integrated as r79: http://code.google.com/p/mac-itunes/source/detail?r=79 Released as version 0.71. Thanks for the patch! -Drew