use strict;
use warnings;
-our $VERSION = '0.006';
+our $VERSION = '1.001_000';
use Audio::FLAC::Header qw//;
use HTML::Template::Compiled qw//;
};
}
+sub opusinfo {
+ my $file = $_[0];
+ my %info;
+ my @info = `opusinfo \Q$file`;
+ return unless @info;
+ for (@info) {
+ chomp;
+ $info{$1} = $2 if /\s*([A-Z]+)=(.*)$/;
+ }
+
+ my %data = (
+ format => 'Opus',
+ title => $info{TITLE},
+ artist => $info{ARTIST},
+ year => $info{DATE},
+ album => $info{ALBUM},
+ tracknumber => $info{TRACKNUMBER},
+ tracktotal => $info{TRACKTOTAL},
+ genre => $info{GENRE},
+ file => scalar fileparse $file
+ );
+
+ freeze \%data;
+}
+
my %info = (
'.flac' => \&flacinfo,
'.mp3' => \&mp3info,
'.mp4' => \&mp4info,
'.aac' => \&mp4info,
'.m4a' => \&mp4info,
+ '.opus' => \&opusinfo,
);
sub normalizer{
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2013-2015 by Marius Gavrilescu
+Copyright (C) 2013-2016 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.14.2 or,