Changeset 25 in mp3-find for trunk/lib/MP3
- Timestamp:
- 04/28/06 03:27:57 (19 years ago)
- Location:
- trunk/lib/MP3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/MP3/Find.pm
r19 r25 9 9 use Carp; 10 10 11 $VERSION = '0.0 4';11 $VERSION = '0.05'; 12 12 13 13 @EXPORT = qw(find_mp3s); -
trunk/lib/MP3/Find/Filesystem.pm
r24 r25 96 96 97 97 if ($$options{use_id3v2}) { 98 require MP3::Tag; 99 # add ID3v2 tag info, if present 100 my $mp3_tags = MP3::Tag->new($filename); 101 $mp3_tags->get_tags; 102 if (my $id3v2 = $mp3_tags->{ID3v2}) { 103 for my $frame_id (keys %{ $id3v2->get_frame_ids }) { 104 my ($info) = $id3v2->get_frame($frame_id); 105 if (ref $info eq 'HASH') { 106 #TODO: how should we handle these? 107 } else { 108 $mp3->{$frame_id} = $info; 109 } 110 } 111 } 98 eval { require MP3::Tag }; 99 if ($@) { 100 # we weren't able to load MP3::Tag! 101 warn "MP3::Tag is required to search ID3v2 tags"; 102 } else { 103 # add ID3v2 tag info, if present 104 my $mp3_tags = MP3::Tag->new($filename); 105 $mp3_tags->get_tags; 106 if (my $id3v2 = $mp3_tags->{ID3v2}) { 107 for my $frame_id (keys %{ $id3v2->get_frame_ids }) { 108 my ($info) = $id3v2->get_frame($frame_id); 109 if (ref $info eq 'HASH') { 110 #TODO: how should we handle these? 111 } else { 112 $mp3->{$frame_id} = $info; 113 } 114 } 115 } 116 } 112 117 } 113 118
Note: See TracChangeset
for help on using the changeset viewer.