next unless defined $info;
my $basename = fileparse $file, '.flac', '.mp3', '.ogg', '.oga', '.mp4', '.aac', '.m4a';
$files{$basename} //= [];
- push $files{$basename}, $info;
+ push @{$files{$basename}}, $info;
}
my $ht=HTML::Template::Compiled->new(
my @versions = @$_;
my %entry = (%{$versions[0]}, formats => []);
for my $ver (@versions) {
- push $entry{formats}, {format => $ver->{format}, file => $ver->{file}};
- for my $key (keys $ver) {
+ push @{$entry{formats}}, {format => $ver->{format}, file => $ver->{file}};
+ for my $key (keys %$ver) {
$entry{$key} = $ver->{$key} if $ver->{$key} ne '?';
}
}