Ignore:
Timestamp:
2012-10-02T05:43:31+13:00 (12 years ago)
Author:
davidb
Message:

Some mods that resulted from testing under Cygwin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/music-ir-src/trunk/perllib/plugins/MusicIRPlugin.pm

    r24433 r26276  
    107107
    108108
    109 # do plugin specific processing of doc_obj
    110 sub process {
     109
     110sub process_features {
    111111    my $self = shift (@_);
    112     my ($pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
     112    my ($base_dir, $file, $doc_obj) = @_;
    113113
    114114    my $outhandle = $self->{'outhandle'};
     
    132132    }
    133133
     134}
     135
     136# do plugin specific processing of doc_obj
     137sub process {
     138    my $self = shift (@_);
     139    my ($pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
     140
     141    my $top_section = $doc_obj->get_top_section();
     142
     143    $self->process_features($base_dir,$file,$doc_obj);
    134144   
    135145    #we have no text - adds dummy text and NoText metadata
    136146    $self->add_dummy_text($doc_obj, $doc_obj->get_top_section());
    137147
     148    my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file);
    138149    $doc_obj->associate_file($filename_full_path, "audio.mp3", "audio/mpeg", $top_section);
    139150
     
    151162    if ($self->{'retrieve_mir_metadata'} eq "true") {
    152163    my $top_section = $doc_obj->get_top_section();
     164
    153165    my $id3_titles = $doc_obj->get_metadata($top_section,"ex.ID3.Title");
    154 
    155     my $id3_title = shift @$id3_titles || "Unknown";
     166    # my $id3_title = shift @$id3_titles || "Unknown";
     167    my $id3_title = shift @$id3_titles || undef;
    156168
    157169    my $id3_artists = $doc_obj->get_metadata($top_section,"ex.ID3.Artist");
    158     my $id3_artist = shift @$id3_artists || "Unkown";
     170    # my $id3_artist = shift @$id3_artists || "Unknown";
     171    my $id3_artist = shift @$id3_artists || undef;
    159172
    160173    my ($metadata_acexml_filename,$metadata_txt_filename)
Note: See TracChangeset for help on using the changeset viewer.