X-Git-Url: http://git.ieval.ro/?p=app-musicexpo.git;a=blobdiff_plain;f=lib%2FApp%2FMusicExpo.pm;h=a6c21a594260ba38e79c593b7f7f762f14229ae1;hp=ebee6efc784f18ae802565dcc0c3a02a79fd8e81;hb=9d6d04a4bf7fc26eb7ea4361c8c726ad24106871;hpb=12d4da0a00f8e1843a7b8624c3bf2d2faf0fa70b diff --git a/lib/App/MusicExpo.pm b/lib/App/MusicExpo.pm index ebee6ef..a6c21a5 100644 --- a/lib/App/MusicExpo.pm +++ b/lib/App/MusicExpo.pm @@ -153,7 +153,13 @@ sub run { for (values %files) { my @versions = @$_; my %entry = (%{$versions[0]}, formats => []); - push $entry{formats}, {format => $_->{format}, file => $_->{file}} for @versions; + for my $ver (@versions) { + push $entry{formats}, {format => $ver->{format}, file => $ver->{file}}; + for my $key (keys $ver) { + $entry{$key} = $ver->{$key} if $ver->{$key} ne '?'; + } + } + delete $entry{$_} for qw/format file/; push @files, \%entry }