summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/VN.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-11-28 10:03:16 +0100
committerYorhel <git@yorhel.nl>2010-11-28 10:03:16 +0100
commitd82f42629c802d968be247832c2e7cbf17eb16c6 (patch)
treedda59c514f81fbc151b9d53480a85090537b700d /lib/VNDB/DB/VN.pm
parent80106c9930e39047fb24f0486412085ca99efef9 (diff)
VN Filter Selector: Added "original language" filter
The original language is the language of the first release of the VN, and is cached in vn.c_olang. (Geez, the vn table has more caching columns than actual information >.>)
Diffstat (limited to 'lib/VNDB/DB/VN.pm')
-rw-r--r--lib/VNDB/DB/VN.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index 1154fc71..d25a5796 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -10,7 +10,7 @@ use Encode 'decode_utf8';
our @EXPORT = qw|dbVNGet dbVNRevisionInsert dbVNImageId dbScreenshotAdd dbScreenshotGet dbScreenshotRandom|;
-# Options: id, rev, char, search, length, lang, plat, tags_include, tags_exclude, hasani, results, page, what, sort, reverse
+# Options: id, rev, char, search, length, lang, olang, plat, tags_include, tags_exclude, hasani, results, page, what, sort, reverse
# What: extended anime relations screenshots relgraph rating ranking changes
# Sort: id rel pop rating title tagscore rand
sub dbVNGet {
@@ -33,6 +33,8 @@ sub dbVNGet {
'vr.length IN(!l)' => [ ref $o{length} ? $o{length} : [$o{length}] ]) : (),
$o{lang} ? (
'v.c_languages && ARRAY[!l]::language[]' => [ ref $o{lang} ? $o{lang} : [$o{lang}] ]) : (),
+ $o{olang} ? (
+ 'v.c_olang && ARRAY[!l]::language[]' => [ ref $o{olang} ? $o{olang} : [$o{olang}] ]) : (),
$o{plat} ? (
'('.join(' OR ', map "v.c_platforms ILIKE '%%$_%%'", ref $o{plat} ? @{$o{plat}} : $o{plat}).')' => 1 ) : (),
defined $o{hasani} ? (