summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-08-17 14:15:31 +0200
committerYorhel <git@yorhel.nl>2020-08-17 14:15:35 +0200
commite4d0915b139c47edc68adc1e45160a987e6a121f (patch)
tree0b37f920338857dcd065b85512da61b43f9b14b1
parent68966655405f2f0d939d76ca09670396bac93d7f (diff)
VN::Page: Fix og:image selection to not select NSFW screenshots in some cases
Which it previously would, if the main image and the first screenshot are both NSFW.
-rw-r--r--lib/VNWeb/VN/Page.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/VN/Page.pm b/lib/VNWeb/VN/Page.pm
index bb25c015..5f24296a 100644
--- a/lib/VNWeb/VN/Page.pm
+++ b/lib/VNWeb/VN/Page.pm
@@ -51,7 +51,7 @@ sub og {
+{
description => bb2text($v->{desc}),
image => $v->{image} && !$v->{image}{sexual} && !$v->{image}{violence} ? tuwf->imgurl($v->{image}{id}) :
- [map $_->{sexual}||$_->{violence}?():(tuwf->imgurl($_->{scr}{id})), $v->{screenshots}->@*]->[0]
+ [map $_->{scr}{sexual}||$_->{scr}{violence}?():(tuwf->imgurl($_->{scr}{id})), $v->{screenshots}->@*]->[0]
}
}