Changeset 25 in mp3-find
- Timestamp:
- 04/28/06 03:27:57 (19 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r20 r25 1 1 Revision history for Perl extension MP3::Find. 2 3 0.05 28 Apr 2006 4 - mp3find searches in ID3v2 tags if MP3::Tag is available 5 - using Sort::Key for sorting of results (if available) 2 6 3 7 0.04 2 Apr 2006 -
trunk/README
r19 r25 1 MP3::Find version 0.0 41 MP3::Find version 0.05 2 2 ====================== 3 3 -
trunk/bin/mp3find
r23 r25 13 13 'sort|s=s' => \my $SORT_TAG, 14 14 'printf=s' => \my $FORMAT, 15 '2' => \my $USE_ID3V2,16 15 ); 17 16 … … 27 26 printf => $FORMAT, 28 27 db_file => catfile($ENV{HOME}, 'mp3.db'), 29 use_id3v2 => $USE_ID3V2,28 use_id3v2 => 1, # search using ID3v2 tags by default 30 29 ); 31 30 -
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.