skip folders without scene.json

This commit is contained in:
j 2024-04-02 12:37:17 +02:00
parent 7654fc7d6c
commit 569c72ee8b
1 changed files with 4 additions and 1 deletions

View File

@ -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 = []