feat(recipe): add Create As Recipe from example images with import dedup check (#945)

This commit is contained in:
Will Miao
2026-06-03 17:50:58 +08:00
parent 98e1d168b0
commit 151a467598
18 changed files with 497 additions and 6 deletions

View File

@@ -115,6 +115,10 @@ class RecipePersistenceService:
if metadata.get("source_path"):
recipe_data["source_path"] = metadata.get("source_path")
nsfw_level = metadata.get("preview_nsfw_level")
if nsfw_level is not None and isinstance(nsfw_level, int):
recipe_data["preview_nsfw_level"] = nsfw_level
json_filename = f"{recipe_id}.recipe.json"
json_path = os.path.join(recipes_dir, json_filename)
json_path = os.path.normpath(json_path)