- "template:s" => \$template,
- "prefix:s" => \$prefix,
- "cache:s" => \$cache,
+ 'template:s' => \$template,
+ 'prefix:s' => \$prefix,
+ 'cache:s' => \$cache,
- title => $flac->tags('TITLE') // '?',
- artist => $flac->tags('ARTIST') // '?',
- year => $flac->tags('DATE') // '?',
- album => $flac->tags('ALBUM') // '?',
- tracknumber => $flac->tags('TRACKNUMBER') // '?',
- tracktotal => $flac->tags('TRACKTOTAL') // '?',
- genre => $flac->tags('GENRE') // '?',
+ title => $flac->tags('TITLE'),
+ artist => $flac->tags('ARTIST'),
+ year => $flac->tags('DATE'),
+ album => $flac->tags('ALBUM'),
+ tracknumber => $flac->tags('TRACKNUMBER'),
+ tracktotal => $flac->tags('TRACKTOTAL'),
+ genre => $flac->tags('GENRE'),
- title => $tag{TITLE} || '?',
- artist => $tag{ARTIST} || '?',
- year => $tag{YEAR} || '?',
- album => $tag{ALBUM} || '?',
- tracknumber => $trkn[0] || '?',
- tracktotal => $trkn[1] || '?',
- genre => $tag{GENRE} || '?',
+ title => $tag{TITLE},
+ artist => $tag{ARTIST},
+ year => $tag{YEAR},
+ album => $tag{ALBUM},
+ tracknumber => $trkn[0],
+ tracktotal => $trkn[1],
+ genre => $tag{GENRE},
- title => $ogg->comment('TITLE') || '?',
- artist => $ogg->comment('artist') || '?',
- year => $ogg->comment('DATE') || '?',
- album => $ogg->comment('ALBUM') || '?',
- tracknumber => $ogg->comment('TRACKNUMBER') || '?',
- tracktotal => $ogg->comment('TRACKTOTAL') || '?',
- genre => $ogg->comment('GENRE') || '?',
+ title => scalar $ogg->comment('TITLE'),
+ artist => scalar $ogg->comment('artist'),
+ year => scalar $ogg->comment('DATE'),
+ album => scalar $ogg->comment('ALBUM'),
+ tracknumber => scalar $ogg->comment('TRACKNUMBER'),
+ tracktotal => scalar $ogg->comment('TRACKTOTAL'),
+ genre => scalar $ogg->comment('GENRE'),
- title => $tag{TITLE} || '?',
- artist => $tag{ARTIST} || '?',
- year => $tag{YEAR} || '?',
- album => $tag{ALBUM} || '?',
- tracknumber => $tag{TRACKNUM} || '?',
- tracktotal => ($tag{TRKN} ? $tag{TRKN}->[1] : undef) || '?',
- genre => $tag{GENRE} || '?',
+ title => $tag{TITLE},
+ artist => $tag{ARTIST},
+ year => $tag{YEAR},
+ album => $tag{ALBUM},
+ tracknumber => $tag{TRACKNUM},
+ tracktotal => ($tag{TRKN} ? $tag{TRKN}->[1] : undef),
+ genre => $tag{GENRE},
- tie my %cache, 'DB_File', $cache, O_RDWR|O_CREAT, 0644;
+ tie my %cache, 'DB_File', $cache, O_RDWR|O_CREAT, 0644; ## no critic (ProhibitTie)
$info{$_} = memoize $info{$_}, INSTALL => undef, NORMALIZER => \&normalizer, LIST_CACHE => 'FAULT', SCALAR_CACHE => [HASH => \%cache] for keys %info;
}
$info{$_} = memoize $info{$_}, INSTALL => undef, NORMALIZER => \&normalizer, LIST_CACHE => 'FAULT', SCALAR_CACHE => [HASH => \%cache] for keys %info;
}
for my $ver (@versions) {
push @{$entry{formats}}, {format => $ver->{format}, file => $ver->{file}};
for my $key (keys %$ver) {
for my $ver (@versions) {
push @{$entry{formats}}, {format => $ver->{format}, file => $ver->{file}};
for my $key (keys %$ver) {
@files = sort { $a->{title} cmp $b->{title} } @files;
$ht->param(files => \@files, prefix => $prefix);
@files = sort { $a->{title} cmp $b->{title} } @files;
$ht->param(files => \@files, prefix => $prefix);