Changeset 31 in flacrip
- Timestamp:
- 11/26/14 22:50:16 (10 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/MusicBrainz.pm
r17 r31 108 108 @info{"$prefix.ARTIST", "$prefix.ARTISTSORT"} = get_artist_credits($xpath, $recording); 109 109 110 $info{TRACKS}[$tracknum]{TITLE} = $info{"$prefix.TITLE"};111 $info{TRACKS}[$tracknum]{ARTIST} = $info{"$prefix.ARTIST"};112 $info{TRACKS}[$tracknum]{ARTISTSORT} = $info{"$prefix.ARTISTSORT"};113 114 110 #my $uri = URI->new("http://musicbrainz.org/ws/2/recording/$recording_mbid"); 115 111 #$uri->query_form(inc => 'artists'); -
trunk/lib/Tracks.pm
r29 r31 120 120 my ($self, $file) = @_; 121 121 122 my $flac = Audio::FLAC::Header->new($file);122 my $flac = ref $file ? $file : Audio::FLAC::Header->new($file); 123 123 my $cuesheet_lines = $flac->cuesheet; 124 124 my $CUE = IO::Lines->new($cuesheet_lines); -
trunk/mbz
r17 r31 9 9 use Getopt::Long; 10 10 use MusicBrainz; 11 use DiscFlacFile; 11 12 12 13 GetOptions( … … 19 20 20 21 if ($FLAC_FILE) { 21 require Audio::FLAC::Header; 22 my $flac = Audio::FLAC::Header->new($FLAC_FILE) or die "Can't read FLAC header from $FLAC_FILE\n"; 23 $discid = $flac->tags('MUSICBRAINZ_DISCID') or die "No MUSICBRAINZ_DISCID tag in $FLAC_FILE\n"; 22 $discid = DiscFlacFile->new({ file => $FLAC_FILE })->discid; 24 23 } else { 25 24 $discid = shift; … … 44 43 } else { 45 44 for my $key (sort keys %{ $info }) { 46 print "$key=$$info{$key}\n" unless ref $info->{$key};45 print "$key=$$info{$key}\n"; 47 46 } 48 47 }
Note: See TracChangeset
for help on using the changeset viewer.