fix nsfw issue

pull/266/head
butaixianran 2023-09-28 09:50:28 +08:00
parent 21e0d9bad1
commit 6932a9e871
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ def get_preview_image_by_model_path(model_path:str, max_size_preview, skip_nsfw_
if model_info["images"]:
for img_dict in model_info["images"]:
if "nsfw" in img_dict.keys():
if img_dict["nsfw"]:
if img_dict["nsfw"] and img_dict["nsfw"] != "None":
util.printD("This image is NSFW")
if skip_nsfw_preview:
util.printD("Skip NSFW image")