$plugin_purpose{'info-ogginfo'} = 
  "Retrieve meta data from OGG files using ogginfo";
$plugin_options{'info-ogginfo'} = [];

push(@info_plugin_hook, sub {
    my ($ti, $langs) = @_;
    my $f = quotemeta($ti->{FILE});
    for my $l(`ogginfo $f`) {
	track_info_set_for_langs($ti, $langs,
	   TITLE=>$1) if ($l =~ /^\s*TITLE=(.*)/i);
	track_info_set_for_langs($ti, $langs,
	   PERFORMER=>$1) if ($l =~ /^\s*ARTIST=(.*)/i);
	track_info_set_for_langs($ti, $langs,
	   MESSAGE=>$1) if ($l =~ /^\s*COMMENT=(.*)/i);
    }
    warn "error while executing ogginfo" if $? != 0;
});

1;

# vim:ft=perl
