summaryrefslogtreecommitdiff
path: root/lib/Multi/API.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-01-30 17:52:21 +0100
committerYorhel <git@yorhel.nl>2021-01-30 17:52:26 +0100
commitc68a8ff715fdc2d80f6ce83014c5945cc7e11c73 (patch)
tree5da30887dacf2d0de29ce748dcf9977b50a61eb5 /lib/Multi/API.pm
parentdb621ea9e1c827735bef546e08d15a69e50b81d1 (diff)
Add "original language" field to VN entries
As a more explicit replacement to the automatically inferred (and sometimes wrong) c_olang. Also to be used for title display customization later on: https://vndb.org/t12465
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 8fa1dedf..287a7a53 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -423,12 +423,12 @@ my %GET_VN = (
},
flags => {
basic => {
- select => 'v.title, v.original, v.c_released, v.c_languages, v.c_olang, v.c_platforms',
+ select => 'v.title, v.original, v.c_released, v.c_languages, v.olang, v.c_platforms',
proc => sub {
$_[0]{original} ||= undef;
$_[0]{platforms} = splitarray delete $_[0]{c_platforms};
$_[0]{languages} = splitarray delete $_[0]{c_languages};
- $_[0]{orig_lang} = splitarray delete $_[0]{c_olang};
+ $_[0]{orig_lang} = [ delete $_[0]{olang} ];
$_[0]{released} = formatdate delete $_[0]{c_released};
},
},
@@ -577,8 +577,8 @@ my %GET_VN = (
[ stra => ':op: (v.c_languages && ARRAY[:value:]::language[])', {'=' => '', '!=' => 'NOT'}, join => ',', process => \'lang' ],
],
orig_lang => [
- [ str => ':op: (v.c_olang && ARRAY[:value:]::language[])', {'=' => '', '!=' => 'NOT'}, process => \'lang' ],
- [ stra => ':op: (v.c_olang && ARRAY[:value:]::language[])', {'=' => '', '!=' => 'NOT'}, join => ',', process => \'lang' ],
+ [ str => 'v.olang :op: :value:', {qw|= = != <>|}, process => \'lang' ],
+ [ stra => 'v.olang :op:(:value:)', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',', process => \'lang' ],
],
search => [
[ str => '(:value:)', {'~',1}, split => \&normalize_query,