use strict;
use warnings;
-our $VERSION = '0.004';
+our $VERSION = '0.005';
use Audio::FLAC::Header qw//;
use HTML::Template::Compiled qw//;
"$_[0]|".(stat $_[0])[9]
}
+sub make_fragment{ join '-', map { lc =~ y/a-z0-9/_/csr } @_ }
+
sub run {
if ($cache) {
tie my %cache, 'DB_File', $cache, O_RDWR|O_CREAT, 0644;
}
}
delete $entry{$_} for qw/format file/;
+ $entry{fragment} = make_fragment @entry{qw/artist title/};
push @files, \%entry
}
<thead>
<tr><th>Title<th>Artist<th>Album<th>Genre<th>Track<th>Year<th>Type
<tbody><tmpl_loop files>
-<tr><td class="title"><tmpl_var title><td class="artist"><tmpl_var artist><td class="album"><tmpl_var album><td class="genre"><tmpl_var genre><td class="track"><tmpl_var tracknumber>/<tmpl_var tracktotal><td class="year"><tmpl_var year><td class="formats"><tmpl_loop formats><a href="<tmpl_var ...prefix><tmpl_var ESCAPE=URL file>"><tmpl_var format></a> </tmpl_loop></tmpl_loop>
+<tr><td class="title"><a href="#<tmpl_var fragment>" data-hash="#<tmpl_var fragment>"><tmpl_var title></a><td class="artist"><tmpl_var artist><td class="album"><tmpl_var album><td class="genre"><tmpl_var genre><td class="track"><tmpl_var tracknumber>/<tmpl_var tracktotal><td class="year"><tmpl_var year><td class="formats"><tmpl_loop formats><a href="<tmpl_var ...prefix><tmpl_var ESCAPE=URL file>"><tmpl_var format></a> </tmpl_loop></tmpl_loop>
</table>
HTML
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2013-2014 by Marius Gavrilescu
+Copyright (C) 2013-2015 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,