Changeset 38 in flacrip for trunk/cd2flac


Ignore:
Timestamp:
03/28/15 00:12:19 (10 years ago)
Author:
peter
Message:

issue #4: set BARCODE tag after successful rip_to_flac() operation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cd2flac

    r23 r38  
    1111use Getopt::Long qw{:config no_ignore_case no_auto_abbrev}; 
    1212use Cwd; 
     13use Audio::FLAC::Header; 
    1314 
    1415GetOptions( 
    15     'device|D=s' => \my $CD_DEVICE, 
    16     'output|o=s' => \my $OUTPUT_NAME, 
    17     'force|f'    => \my $FORCE, 
     16    'device|D=s'  => \my $CD_DEVICE, 
     17    'output|o=s'  => \my $OUTPUT_NAME, 
     18    'force|f'     => \my $FORCE, 
     19    'barcode|b=s' => \my $BARCODE, 
    1820); 
    1921 
     
    3840$ripper->rip_to_flac($archive_flac); 
    3941 
     42if ($BARCODE) { 
     43    print "Writing barcode\n"; 
     44    system 'metaflac', '--set-tag', "BARCODE=$BARCODE", $archive_flac; 
     45} 
     46 
    4047print "Rip saved as $archive_flac\n"; 
    4148system 'eject', $CD_DEVICE; 
Note: See TracChangeset for help on using the changeset viewer.