summaryrefslogtreecommitdiff
path: root/lib/Multi/API.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-10-02 15:49:21 +0200
committerYorhel <git@yorhel.nl>2022-10-02 15:49:21 +0200
commitcdefbcdbbdebb706df844cfa967b9cfe9bd9c4ca (patch)
tree6c7f4232d0b3220fd85938d745808cf734648e89 /lib/Multi/API.pm
parent294a7d77ca2081d51a7e71964e267828aa55cd45 (diff)
API: Add VN length vote stats
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r--lib/Multi/API.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index 8a99ddac..22e40036 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -471,11 +471,14 @@ my %GET_VN = (
},
},
details => {
- select => 'v.image, i.c_sexual_avg, i.c_violence_avg, i.c_votecount, v.alias AS aliases, v.length, v.desc AS description, v.l_wp, v.l_encubed, v.l_renai, l_wikidata',
+ select => 'v.image, i.c_sexual_avg, i.c_violence_avg, i.c_votecount, v.alias AS aliases,
+ v.length, v.c_length AS length_minutes, v.c_lengthnum AS length_votes, v.desc AS description, v.l_wp, v.l_encubed, v.l_renai, l_wikidata',
proc => sub {
$_[0]{aliases} ||= undef;
$_[0]{length} *= 1;
$_[0]{length} ||= undef;
+ $_[0]{length_votes}*= 1;
+ $_[0]{length_minutes}*=1 if defined $_[0]{length_minutes};
$_[0]{description} ||= undef;
$_[0]{links} = {
wikipedia => delete($_[0]{l_wp}) ||undef,