Changeset 24433


Ignore:
Timestamp:
2011-08-19T17:59:27+12:00 (11 years ago)
Author:
davidb
Message:

Extracted metadata now has explicit 'ex.' in front

File:
1 edited

Legend:

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

    r22468 r24433  
    112112    my ($pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
    113113
    114 
    115114    my $outhandle = $self->{'outhandle'};
    116115    my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file);
     116
     117    my $top_section = $doc_obj->get_top_section();
    117118
    118119    if ($self->{'compute_mir_features'} eq "true")
     
    124125    my ($features_ext) = ($features_filename =~ m/\.([^.]+)$/);
    125126
    126     my $top_section = $doc_obj->get_top_section();
    127127   
    128128    my $mime_type = ($features_ext eq "arff") ? "text/plain" : "text/xml";
     
    135135    #we have no text - adds dummy text and NoText metadata
    136136    $self->add_dummy_text($doc_obj, $doc_obj->get_top_section());
     137
     138    $doc_obj->associate_file($filename_full_path, "audio.mp3", "audio/mpeg", $top_section);
    137139
    138140    return 1;
     
    149151    if ($self->{'retrieve_mir_metadata'} eq "true") {
    150152    my $top_section = $doc_obj->get_top_section();
    151     my $id3_titles = $doc_obj->get_metadata($top_section,"ID3.Title");
     153    my $id3_titles = $doc_obj->get_metadata($top_section,"ex.ID3.Title");
    152154
    153155    my $id3_title = shift @$id3_titles || "Unknown";
    154156
    155     my $id3_artists = $doc_obj->get_metadata($top_section,"ID3.Artist");
     157    my $id3_artists = $doc_obj->get_metadata($top_section,"ex.ID3.Artist");
    156158    my $id3_artist = shift @$id3_artists || "Unkown";
    157159
     
    163165    }
    164166
    165 
     167    $doc_obj->associate_file($metadata_acexml_filename, "jsongminer.xml",
     168                 "text/xml", $top_section);
    166169    }
    167170
Note: See TracChangeset for help on using the changeset viewer.