X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FMusicExpo.pm;h=c3ee03a7d2fa858e31ea3de847f1d0e71daaa52b;hb=aa46057307cb8c8c9aa66a19693bf3aab1797639;hp=23489619410c1c031001ff98043f57724aaad897;hpb=7ad441f0fdb3394b96f96be789da87fd0ff8f4e5;p=app-musicexpo.git diff --git a/lib/App/MusicExpo.pm b/lib/App/MusicExpo.pm index 2348961..c3ee03a 100644 --- a/lib/App/MusicExpo.pm +++ b/lib/App/MusicExpo.pm @@ -1,8 +1,10 @@ -package App::MusicExpo 0.002; +package App::MusicExpo; use v5.14; use strict; use warnings; +our $VERSION = 0.003001; + use Audio::FLAC::Header qw//; use HTML::Template::Compiled qw//; use Memoize qw/memoize/; @@ -31,8 +33,9 @@ GetOptions ( sub fix{ - utf8::decode($_[0]); - $_[0] + my $copy = $_[0]; + utf8::decode($copy); + $copy } sub flacinfo{ @@ -113,6 +116,7 @@ sub run { my $ht=HTML::Template::Compiled->new( default_escape => 'HTML', + global_vars => 2, $template eq '' ? (scalarref => \$default_template) : (filename => $template), ); @@ -138,7 +142,7 @@ $default_template = <<'HTML'; TitleArtistAlbumGenreTrackYearType -/ +/ HTML @@ -165,7 +169,10 @@ The default template looks like: |---------+---------+-----------------+---------+-------+------+------| | Cellule | Silence | L'autre endroit | Electro | 01/09 | 2005 | FLAC | -where the title is a download link. +where the type is a download link. If you have multiple files with the same +basename (such as C and C), they will be treated +as two versions of the same file, so a row will be created with two download +links, one for each format. =head1 OPTIONS