summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Traits.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-07-08 15:25:29 +0200
committerYorhel <git@yorhel.nl>2019-07-08 15:25:31 +0200
commitab05632cd6d2c1edfb5791711614b1633f72b194 (patch)
tree84e1335c1d3ee940cfd5a013ba541411c967f815 /lib/VNDB/Handler/Traits.pm
parent37f6528e6ac44e9a036e6c4ea8a9ba7837c907f7 (diff)
Add Producer/Staff/Seiyuu filters to Release/VN/Char filters
This also abstracts and changes the tag/trait filter selection interface a little bit. Non-searchable tags/traits are now simply not listed anymore in the dropdown search.
Diffstat (limited to 'lib/VNDB/Handler/Traits.pm')
-rw-r--r--lib/VNDB/Handler/Traits.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VNDB/Handler/Traits.pm b/lib/VNDB/Handler/Traits.pm
index 8d798245..05321988 100644
--- a/lib/VNDB/Handler/Traits.pm
+++ b/lib/VNDB/Handler/Traits.pm
@@ -426,6 +426,7 @@ sub traitxml {
{ get => 'q', required => 0, maxlength => 500 },
{ get => 'id', required => 0, multi => 1, template => 'id' },
{ get => 'r', required => 0, default => 15, template => 'uint', min => 1, max => 200 },
+ { get => 'searchable', required => 0, default => 0 },
);
return $self->resNotFound if $f->{_err} || (!$f->{q} && !$f->{id} && !$f->{id}[0]);
@@ -434,6 +435,7 @@ sub traitxml {
page => 1,
sort => 'group',
state => 2,
+ $f->{searchable} ? (searchable => 1) : (),
!$f->{q} ? () : $f->{q} =~ /^i([1-9]\d*)/ ? (id => $1) : (search => $f->{q}, sort => 'search'),
$f->{id} && $f->{id}[0] ? (id => $f->{id}) : (),
);