Ignore:
Timestamp:
2022-08-16T19:45:27+12:00 (21 months ago)
Author:
kjdon
Message:

now I have removed commented out code from last commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/EmbeddedMetadataPlugin.pm

    r36372 r36373  
    3030use BaseImporter;
    3131use MetadataRead;
    32 use extrametautil;
    3332use util;
    3433
     
    437436    }
    438437
    439     # Indexing into the extrameta data structures requires the filename's style of slashes to be in URL format
    440     # Then need to convert the filename to a regex, no longer to protect windows directory chars \, but for
    441     # protecting special characters like brackets in the filepath such as "C:\Program Files (x86)\Greenstone".
    442     #print STDERR "file = $file " . &unicode::debug_unicode_string($file);
     438   #print STDERR "file = $file " . &unicode::debug_unicode_string($file);
    443439    $file = &util::raw_filename_to_unicode(&util::filename_head($filename), $file);
    444440
    445441    $self->store_meta_in_extrametadata($file, $exif_metadata, undef, undef, $extrametakeys, $extrametadata, $extrametafile);
    446442
    447     if (0) {
    448     #print STDERR "$file ". &unicode::debug_unicode_string($file);
    449     $file = &util::filepath_to_url_format($file);
    450     #print STDERR "$file " . &unicode::debug_unicode_string($file);
    451     $file = &util::filename_to_regex($file);
    452     #print STDERR "$file ".&unicode::debug_unicode_string($file) ."\n";
    453    
    454     # Associate the metadata now
    455 
    456     if (defined &extrametautil::getmetadata($extrametadata, $file)) {
    457     print STDERR "\n****  EmbeddedMetadataPlugin: Need to merge new metadata with existing stored metadata: file = $file\n" if $verbosity > 3;
    458 
    459     my $file_metadata_table = &extrametautil::getmetadata($extrametadata, $file);
    460 
    461     foreach my $metaname (keys %exif_metadata) {
    462         # will create new entry if one does not already exist
    463         push(@{$file_metadata_table->{$metaname}}, @{$exif_metadata{$metaname}});       
    464     }
    465 
    466     # no need to push $file on to $extrametakeys as it is already in the list
    467     }
    468     else {
    469     &extrametautil::setmetadata($extrametadata, $file, \%exif_metadata);
    470     &extrametautil::addmetakey($extrametakeys, $file);
    471     }
    472     }
     443
    473444}
    474445
Note: See TracChangeset for help on using the changeset viewer.