summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-10-04 08:37:23 +0200
committerYorhel <git@yorhel.nl>2018-10-04 08:37:27 +0200
commit3754ea24d296b74de5315789b74a7db2b7bacad9 (patch)
tree1277df54aa67ca0f0a2af715f47cddef226c9aee /lib/VNDB/Util
parentbfb19401c38f68a3145ca49948667470a9370aa0 (diff)
Fix release filter compatibility with multiple resolutions
Compatability is hard...
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r--lib/VNDB/Util/Misc.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/VNDB/Util/Misc.pm b/lib/VNDB/Util/Misc.pm
index e223f777..1146c687 100644
--- a/lib/VNDB/Util/Misc.pm
+++ b/lib/VNDB/Util/Misc.pm
@@ -98,9 +98,13 @@ sub filCompat {
$mod++;
}
- if($type eq 'release' && $fil->{resolution} && $fil->{resolution} =~ /^[0-9]+$/) {
- $fil->{resolution} = (keys %{$self->{resolutions}})[$fil->{resolution}] || 'unknown';
- $mod++;
+ if($type eq 'release' && $fil->{resolution}) {
+ $fil->{resolution} = [ map {
+ if(/^[0-9]+$/) {
+ $mod++;
+ (keys %{$self->{resolutions}})[$_] || 'unknown'
+ } else { $_ }
+ } ref $fil->{resolution} ? @{$fil->{resolution}} : $fil->{resolution} ];
}
$mod;