From 90b1ec46430b7991ddcdd0bf46d40dc106c44e8d Mon Sep 17 00:00:00 2001 From: "y.takahashi" Date: Sat, 20 Jul 2024 13:19:23 +0900 Subject: [PATCH] =?UTF-8?q?PixivResolver=20AI=E7=94=9F=E6=88=90=E3=82=BF?= =?UTF-8?q?=E3=82=B0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetadataResolver/PixivResolver.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/MetadataResolver/PixivResolver.php b/app/MetadataResolver/PixivResolver.php index b0b4df9b..ca819d2b 100644 --- a/app/MetadataResolver/PixivResolver.php +++ b/app/MetadataResolver/PixivResolver.php @@ -77,6 +77,10 @@ public function resolve(string $url): Metadata $metadata->image = str_replace('_p0', '_p' . $page, $metadata->image); } + // AI生成タグ + if (!empty($json['body']['aiType']) && $json['body']['aiType'] === 2) { + $metadata->tags[] = 'AI生成'; + } // タグ if (!empty($json['body']['tags']['tags'])) { foreach ($json['body']['tags']['tags'] as $tag) {