summaryrefslogtreecommitdiff
path: root/lib/Multi/API.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2016-01-16 11:52:22 +0100
committerYorhel <git@yorhel.nl>2016-01-16 15:11:36 +0100
commit6313653b01652affded23d682d136e5e6ee42799 (patch)
tree528263a90a2c336c3ab6226c211a1abeccffacb3 /lib/Multi/API.pm
parentca1a9c48c24a436babd30ad9e315db2781364879 (diff)
L10N: Intern languages/platforms/resolutions/media/ptype/rtype/vnlength
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r--lib/Multi/API.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index 256a4532..75922ea1 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -562,7 +562,7 @@ my %GET_RELEASE = (
}
for (@$r) {
delete $_->{id};
- $_->{qty} = $VNDB::S{media}{$_->{medium}} ? $_->{qty}*1 : undef;
+ $_->{qty} = $VNDB::S{media}{$_->{medium}}[0] ? $_->{qty}*1 : undef;
}
} ],
]
@@ -706,7 +706,7 @@ my %GET_PRODUCER = (
],
type => [
[ str => 'p.type :op: :value:', {qw|= = != <>|},
- process => sub { !grep($_ eq $_[0], @{$VNDB::S{producer_types}}) ? \'No such producer type' : $_[0] } ],
+ process => sub { !$VNDB::S{producer_types}{$_[0]} ? \'No such producer type' : $_[0] } ],
],
language => [
[ str => 'p.lang :op: :value:', {qw|= = != <>|}, process => \'lang' ],
@@ -945,9 +945,9 @@ sub get_filters {
y/%//;
$v = "%$v%";
} elsif(${$o{process}} eq 'lang') {
- return cerr $c, filter => 'Invalid language code', %e if !grep $v eq $_, @{$VNDB::S{languages}};
+ return cerr $c, filter => 'Invalid language code', %e if !$VNDB::S{languages}{$v};
} elsif(${$o{process}} eq 'plat') {
- return cerr $c, filter => 'Invalid platform code', %e if !grep $v eq $_, @{$VNDB::S{platforms}};
+ return cerr $c, filter => 'Invalid platform code', %e if !$VNDB::S{platforms}{$v};
}
}