summaryrefslogtreecommitdiff
path: root/elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-01-13 14:16:16 +0100
committerYorhel <git@yorhel.nl>2021-01-13 14:16:18 +0100
commit3681cc0dc55c655776005d4e13e8510c8228534e (patch)
tree91baf2570b4d151eaecb1487321fc4e943b5683b /elm
parent77d17854e5558d65625d8701f6e6c384d492047a (diff)
AdvSearch: Seiyuu->VA, "Staff" filter now includes VAs, remove role filter from Char->VA
I considered adding a separate "Voice actor" subquery for VNs, but the current system doesn't properly handle multiple different subqueries of the same type (i.e. two types of V->S subqueries). And it does make sense to consider VAs as part of the VNs staff, even more so when the staff role filter includes "Voice Actor" role. Fortunately, Postgres is pretty clever with optimizing these. If you specify VA as role, the vn_staff table isn't even scanned. Likewise, if you specify a non-VA role, the vn_seiyuu table is completely ignored. Unfortunately, these optimizations don't work when the role filter is inverted, but I /might/ be able to fix that too. Let's just see how this is received.
Diffstat (limited to 'elm')
-rw-r--r--elm/AdvSearch/Fields.elm7
1 files changed, 4 insertions, 3 deletions
diff --git a/elm/AdvSearch/Fields.elm b/elm/AdvSearch/Fields.elm
index 433148d3..be59cc95 100644
--- a/elm/AdvSearch/Fields.elm
+++ b/elm/AdvSearch/Fields.elm
@@ -163,13 +163,14 @@ nestView dat dd model =
Just f.ptype == List.head model.addtype
&& f.title /= ""
&& (dat.uid /= Nothing || f.title /= "My Labels")
+ && not (f.title == "Role" && (List.head (List.drop 1 model.addtype)) == Just C) -- No "role" filter for character seiyuu (the seiyuu role is implied, after all)
&& not (Set.member (showQType f.qtype) parents))
showT par t =
case (par,t) of
(_,V) -> "VN"
(_,R) -> "Release"
(_,C) -> "Character"
- (C,S) -> "Seiyuu"
+ (C,S) -> "VA"
(_,S) -> "Staff"
breads pre par l =
case l of
@@ -220,7 +221,7 @@ nestView dat dd model =
(_, R) -> "Rel"
(_, V) -> "VN"
(V, S) -> "Staff"
- (C, S) -> "Seiyuu"
+ (C, S) -> "VA"
_ -> ""
ourdd =
@@ -438,7 +439,7 @@ fields =
, f R "Engine" 0 FMEngine AEng.init AEng.fromQuery
, n C C "And/Or"
- , n C S "Seiyuu »"
+ , n C S "Voice Actor »"
, f C "Role" 1 FMRole AS.init AS.roleFromQuery
, f C "Age" 0 FMAge AR.ageInit AR.ageFromQuery
, f C "Sex" 2 FMSex (AS.sexInit False) (AS.sexFromQuery False)