Changeset 31 in flacrip for trunk/mbz


Ignore:
Timestamp:
11/26/14 22:50:16 (10 years ago)
Author:
peter
Message:
  • mbz uses DiscFlacFile to read the discid from a FLAC file
  • remove the TRACKS array from the returned info hash from get_musicbrainz_info()
  • Tracks::read_flac() can take an Audio::FLAC::Header as its argument instead of a filename
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mbz

    r17 r31  
    99use Getopt::Long; 
    1010use MusicBrainz; 
     11use DiscFlacFile; 
    1112 
    1213GetOptions( 
     
    1920 
    2021if ($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; 
    2423} else { 
    2524    $discid = shift; 
     
    4443} else { 
    4544    for my $key (sort keys %{ $info }) { 
    46         print "$key=$$info{$key}\n" unless ref $info->{$key}; 
     45        print "$key=$$info{$key}\n"; 
    4746    } 
    4847} 
Note: See TracChangeset for help on using the changeset viewer.