diff options
author | Yorhel <git@yorhel.nl> | 2020-06-29 11:34:34 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-06-29 11:34:36 +0200 |
commit | d5b13e58abee0b2edbe16705451d498e39235d77 (patch) | |
tree | 222c4a0db15ed205bc894d703065300c8e9b94e7 /lib/VNWeb/Elm.pm | |
parent | 6831c0b0de4c6581f7d5481e1df4e37754d64b63 (diff) |
VN::Edit: Add length/wikidata/renai/anime fields
Completing the "General info" tab. This makes use of the new anime
titles import for validation and autocomplete.
It does have a bug, though, as it also autocompletes deleted AniDB
entries that happen to have been linked to old VN revisions. Need to
find a way to mark those for exclusion.
Diffstat (limited to 'lib/VNWeb/Elm.pm')
-rw-r--r-- | lib/VNWeb/Elm.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VNWeb/Elm.pm b/lib/VNWeb/Elm.pm index b8598438..32951a24 100644 --- a/lib/VNWeb/Elm.pm +++ b/lib/VNWeb/Elm.pm @@ -103,6 +103,11 @@ our %apis = ( original => { required => 0, default => '' }, } } } } ], + AnimeResult => [ { aoh => { # Response to 'Anime' + id => { id => 1 }, + title => {}, + original => { required => 0, default => '' }, + } } ], ImageResult => [ { aoh => { # Response to 'Images' id => { }, # image id... token => { required => 0 }, @@ -396,6 +401,7 @@ sub write_types { $data .= def cupSizes => 'List (String, String)' => list map tuple(string $_, string $CUP_SIZE{$_}), keys %CUP_SIZE; $data .= def bloodTypes => 'List (String, String)' => list map tuple(string $_, string $BLOOD_TYPE{$_}), keys %BLOOD_TYPE; $data .= def charRoles => 'List (String, String)' => list map tuple(string $_, string $CHAR_ROLE{$_}{txt}), keys %CHAR_ROLE; + $data .= def vnLengths => 'List (Int, String)' => list map tuple($_, string $VN_LENGTH{$_}{txt}.($VN_LENGTH{$_}{time}?" ($VN_LENGTH{$_}{time})":'')), keys %VN_LENGTH; $data .= def curYear => Int => (gmtime)[5]+1900; write_module Types => $data; |