Changeset 8519
- Timestamp:
- 2004-11-11T15:51:11+13:00 (20 years ago)
- Location:
- trunk/gsdl/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/MP3Plug.pm
r8365 r8519 186 186 187 187 $doc_obj->add_metadata ($section, $mp3_metaname, $mp3_metavalue); 188 if ($mp3_metaname eq "mp3:Title") {189 $doc_obj->add_metadata ($section, "Title", $mp3_metavalue);190 }191 188 } 192 189 } … … 217 214 218 215 $doc_obj->add_metadata ($section, $mp3t_metaname, $mp3t_metavalue); 219 if ($mp3t_metaname eq "mp3:Title") {220 $doc_obj->add_metadata ($section, "Title", $mp3t_metavalue);221 }222 216 } 223 217 } … … 226 220 } 227 221 228 $self->title_fallback($doc_obj,$section,$file);229 222 $doc_obj->add_metadata ($section, "FileFormat", "MP3"); 230 223 … … 352 345 $self->extra_metadata ($doc_obj, $section, $metadata); 353 346 347 $self->title_fallback($doc_obj,$section,$file); 348 354 349 # do plugin specific processing of doc_obj 355 350 return undef unless defined ($self->process (\$text, $pluginfo, $base_dir, … … 371 366 372 367 368 sub title_fallback 369 { 370 my $self = shift (@_); 371 my ($doc_obj,$section,$file) = @_; 372 373 if (!defined $doc_obj->get_metadata_element ($section, "Title")) { 374 my $mp3_title = $doc_obj->get_metadata_element ($section, "mp3:Title"); 375 if (defined $mp3_title) { 376 $doc_obj->add_metadata ($section, "Title", $mp3_title); 377 } 378 else { 379 &BasPlug::title_fallback($self, $doc_obj, $section, $file); 380 } 381 } 382 } 383 373 384 374 385 1; -
trunk/gsdl/perllib/plugins/UnknownPlug.pm
r8365 r8519 142 142 $doc_obj->add_metadata ($section, "FileFormat", $file_format); 143 143 $doc_obj->add_metadata ($section, $assoc_field, $file); 144 145 $self->title_fallback($doc_obj,$section,$file);146 144 147 145 $doc_obj->add_metadata ($section, "srclink", … … 205 203 $self->extra_metadata ($doc_obj, $section, $metadata); 206 204 205 $self->title_fallback($doc_obj,$section,$file); 206 207 207 # do plugin specific processing of doc_obj 208 208 return -1 unless defined ($self->process (\$text, $pluginfo, $base_dir,
Note:
See TracChangeset
for help on using the changeset viewer.