$plugin_purpose{'info-id3info'} = 
  "Retrieve meta data from ID3 tags of audio files using id3info";
$plugin_options{'info-id3info'} = [];

push(@info_plugin_hook, sub {
    my ($ti, $langs) = @_;
    my $f = quotemeta($ti->{FILE});
    for my $l(`id3info $f`) {
	track_info_set_for_langs($ti, $langs,
	   TITLE=>encode(langinfo(CODESET()), decode('UTF-8', $1)))
          if ($l =~ /^=== TIT2.*?: (.*)/);
	track_info_set_for_langs($ti, $langs,
	   PERFORMER=>encode(langinfo(CODESET()), decode('UTF-8', $1)))
          if ($l =~ /^=== TPE1.*?: (.*)/);
	track_info_set_for_langs($ti, $langs,
	   MESSAGE=>encode(langinfo(CODESET()), decode('UTF-8', $1)))
          if ($l =~ /^=== COMM.*?: (.*)/);
    }
    warn "error while executing id3info" if $? != 0;
});

1;

# vim:ft=perl
