use MP3::Info;

$plugin_purpose{'info-MP3-Info'} = 
  "Retrieve meta data from ID3 tags of audio files using MP3::Info Perl module";
$plugin_options{'info-MP3-Info'} = [];

MP3::Info::use_mp3_utf8(1);

push(@info_plugin_hook, sub {
	my ($ti, $langs) = @_;
	my $t = get_mp3tag($ti->{FILE});
	track_info_set_for_langs($ti, $langs,
	    TITLE=>encode(langinfo(CODESET()), $t->{TITLE}))
	    if defined $t->{TITLE};
	track_info_set_for_langs($ti, $langs,
	    PERFORMER=>encode(langinfo(CODESET()), $t->{ARTIST}))
	    if defined $t->{ARTIST};
	track_info_set_for_langs($ti, $langs,
	    MESSAGE=>encode(langinfo(CODESET()), $t->{COMMENT}))
	    if defined $t->{COMMENT};
});

1;
# vim:ft=perl
