Bump version and update Changes
[app-musicexpo.git] / lib / App / MusicExpo.pm
index cf16468be168d69498b4ead9bec69d2a2b308925..5eb5a6a840d427b16b8efebd2f442e6ca8f50815 100644 (file)
@@ -3,7 +3,7 @@ use 5.014000;
 use strict;
 use warnings;
 
-our $VERSION = '0.006';
+our $VERSION = '1.001_000';
 
 use Audio::FLAC::Header qw//;
 use HTML::Template::Compiled qw//;
@@ -111,6 +111,31 @@ sub mp4info{
        };
 }
 
+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,
@@ -119,6 +144,7 @@ my %info = (
        '.mp4' => \&mp4info,
        '.aac' => \&mp4info,
        '.m4a' => \&mp4info,
+       '.opus' => \&opusinfo,
 );
 
 sub normalizer{
@@ -237,7 +263,7 @@ Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
 
 =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,
This page took 0.010545 seconds and 4 git commands to generate.