Changeset 5 in flacrip for trunk/MusicBrainz.pm


Ignore:
Timestamp:
05/06/13 15:47:48 (11 years ago)
Author:
peter
Message:
  • mbz: only print non-ref values of the info
  • use-cases: added note about submitting a new discid
  • flactrack:
    • hardcoded the library location for now
    • sort the supplied %TRACKS by their keys
    • remove special characters from the output filename using quotemeta
    • abort with an error message if no MusicBrainz info is found
    • abort with an error message if the flac decoding is canceled
  • MusicBrainz.pm: select the proper medium (by DiscID) as the context for querying the tracklist, so multi-disc releases get the proper tracklist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MusicBrainz.pm

    r4 r5  
    5353    # TODO: get release date 
    5454 
     55    # select the proper medium (important for multidisc releases) 
     56    my ($medium) = $xpath->findnodes("medium-list/medium[disc-list/disc/\@id='$discid']", $release); 
     57 
    5558    my $ua = LWP::UserAgent->new; 
    5659    my $tracknum = 1; 
    57     for my $track_node ($xpath->findnodes('.//track-list/track', $release)) { 
     60    for my $track_node ($xpath->findnodes('track-list/track', $medium)) { 
    5861        my $prefix = sprintf('TRACK%02d', $tracknum); 
    5962        #$info{"$prefix.MB_TRACKID"} = $xpath->findvalue('@id', $track_node); 
Note: See TracChangeset for help on using the changeset viewer.