mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
Consider any .json file from Nextcloud (#164)
This commit is contained in:
parent
774c5d6b45
commit
97c20b384c
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,8 @@ def import_recipes(recipe_dir: Path) -> Recipe:
|
||||||
for file in recipe_dir.glob("full.*"):
|
for file in recipe_dir.glob("full.*"):
|
||||||
image = file
|
image = file
|
||||||
|
|
||||||
recipe_file = recipe_dir.joinpath("recipe.json")
|
for file in recipe_dir.glob("*.json"):
|
||||||
|
recipe_file = file
|
||||||
|
|
||||||
with open(recipe_file, "r") as f:
|
with open(recipe_file, "r") as f:
|
||||||
recipe_dict = json.loads(f.read())
|
recipe_dict = json.loads(f.read())
|
||||||
|
@ -81,6 +82,7 @@ def migrate(session, selection: str):
|
||||||
successful_imports.append(recipe.name)
|
successful_imports.append(recipe.name)
|
||||||
except:
|
except:
|
||||||
logging.error(f"Failed Nextcloud Import: {dir.name}")
|
logging.error(f"Failed Nextcloud Import: {dir.name}")
|
||||||
|
logging.exception('')
|
||||||
failed_imports.append(dir.name)
|
failed_imports.append(dir.name)
|
||||||
|
|
||||||
cleanup()
|
cleanup()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue