From 569c72ee8bcd62fb3b69a6a3a9f4964836a52926 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 2 Apr 2024 12:37:17 +0200 Subject: [PATCH] skip folders without scene.json --- render.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/render.py b/render.py index 2cb0abf..dec37e9 100644 --- a/render.py +++ b/render.py @@ -626,7 +626,10 @@ def update_subtitles(options): base_prefix = prefix / 'render' / str(base) for folder in os.listdir(base_prefix): folder = base_prefix / folder - with open(folder / "scene.json") as fd: + scene_json = folder / "scene.json" + if not os.path.exists(scene_json): + continue + with open(scene_json) as fd: scene = json.load(fd) offset = 0 subs = []