Changeset 26 in flacrip for trunk/lib/Ripper.pm


Ignore:
Timestamp:
10/31/14 21:22:35 (9 years ago)
Author:
peter
Message:
  • added parse_cuesheet() function to Tracks
  • Tracks can now read tracks in from the CUESHEET block of a FLAC file (read_flac) or from a cue file directly (read_cue)
  • Tracks can caluclate the MusicBrainz TOC lookup string (get_musicbrainz_tocdata)
  • renamed the get_mbz_discid method to get_musicbrainz_discid
  • moved the get_cdparanoia_span method into the Ripper class and made it private
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Ripper.pm

    r24 r26  
    3030 
    3131    # rip 
    32     my $span = $self->tracks->get_cdparanoia_span; 
     32    my $span = $self->_get_cdparanoia_span; 
    3333    system 'cdparanoia', '-d', $self->device, $span, $wav_file; 
    3434    die "\nRipping canceled\n" if ($? & 127); 
     
    4242 
    4343    # MusicBrainz discid metadata 
    44     my $discid = $self->tracks->get_mbz_discid; 
     44    my $discid = $self->tracks->get_musicbrainz_discid; 
    4545 
    4646    # copy to permanent location 
     
    4949} 
    5050 
     51sub _get_cdparanoia_span { 
     52    my ($self) = @_; 
     53    # use a msf start unless track 1 begins at sector 
     54    return $self->tracks->tracks->[1]{sector} == 0 ? '1-' : '00:00.00-'; 
     55} 
     56 
    5157# module return 
    52581; 
Note: See TracChangeset for help on using the changeset viewer.