- Timestamp:
- 2020-09-14T11:29:43+12:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/mars-src/trunk/perllib/plugins/AMCMetadataJSONPlugin.pm
r34356 r34367 166 166 167 167 my $local_audio_file = $audio_url; 168 $local_audio_file =~ s/^http:\/\/.*\///; 169 170 print STDERR "***** local audio file = $local_audio_file\n"; 168 $local_audio_file =~ s/^http(s?):\/\/.*\///; 169 my ($amc_id) = ($local_audio_file =~ m/^(.+)(?:\..+?)$/); 170 171 ## print STDERR "***** local audio file = $local_audio_file\n"; 171 172 173 # Set up metadata table based on JSON file read in 172 174 foreach my $k (keys %$json_metadata) { 173 175 $json_metadata->{'amc.'.$k} = [ $json_metadata->{$k} ]; 174 176 delete $json_metadata->{$k}; 175 177 } 176 178 $json_metadata->{'amc.id'} = [ $amc_id ]; 177 179 178 180 # my $json_filename = shift(@$json_trackurl_array); … … 184 186 185 187 ### print STDERR "**** setting up mapping for: $json_filename\n"; 186 188 189 # Set up mapping from local_audio_file to the created JSON metadata table 190 # so it 'sticks' to the file 187 191 $extrametadata->{$local_audio_file} = $json_metadata; 188 192 push(@$extrametakeys, $local_audio_file);
Note:
See TracChangeset
for help on using the changeset viewer.