skip folders without scene.json

This commit is contained in:
j 2024-04-02 12:37:17 +02:00
parent 7654fc7d6c
commit 569c72ee8b

View file

@ -626,7 +626,10 @@ def update_subtitles(options):
base_prefix = prefix / 'render' / str(base) base_prefix = prefix / 'render' / str(base)
for folder in os.listdir(base_prefix): for folder in os.listdir(base_prefix):
folder = base_prefix / folder 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) scene = json.load(fd)
offset = 0 offset = 0
subs = [] subs = []