summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Releases.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/DB/Releases.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/DB/Releases.pm')
-rw-r--r--lib/VNDB/DB/Releases.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Releases.pm b/lib/VNDB/DB/Releases.pm
index a2614ca8..9f164251 100644
--- a/lib/VNDB/DB/Releases.pm
+++ b/lib/VNDB/DB/Releases.pm
@@ -41,12 +41,14 @@ sub dbReleaseFilters {
grep(/^unk$/, @{$o{med}}) ? 'NOT EXISTS(SELECT 1 FROM releases_media irm WHERE irm.id = r.id)' : (),
grep(!/^unk$/, @{$o{med}}) ? 'r.id IN(SELECT irm.id FROM releases_media irm WHERE irm.medium IN(!l))' : ()
).')', [ [ grep(!/^unk$/, @{$o{med}}) ] ]) : (),
+ $o{prod_inc} ? ('r.id IN(SELECT irp.id FROM releases_producers irp WHERE irp.pid IN(!l))' => [ ref $o{prod_inc} ? $o{prod_inc} : [$o{prod_inc}] ]) : (),
+ $o{prod_exc} ? ('r.id NOT IN(SELECT irp.id FROM releases_producers irp WHERE irp.pid IN(!l))' => [ ref $o{prod_exc} ? $o{prod_exc} : [$o{prod_exc}] ]) : (),
);
}
# Options: id vid pid released page results what med sort reverse date_before date_after
-# plat lang olang type minage search resolution freeware doujin voiced uncensored ani_story ani_ero hidden_only
+# plat prod_inc prod_exc lang olang type minage search resolution freeware doujin voiced uncensored ani_story ani_ero hidden_only
# What: extended vn producers platforms media affiliates
# Sort: title released minage
sub dbReleaseGet {