fix ai symlinks

This commit is contained in:
j 2026-01-25 18:53:31 +01:00
commit 90f1954317

View file

@ -883,13 +883,15 @@ def generate_clips(options):
n += 1
clip['ai'][ai_type] = target
type_ = ai_type
else:
clip[type_] = target
target = os.path.join(prefix, 'video', type_, i.data['title'] + ext)
os.makedirs(os.path.dirname(target), exist_ok=True)
if type_ == "source":
source_target = target
clip['loudnorm'] = get_loudnorm(e.files.filter(selected=True)[0])
if type_.startswith('ai:'):
clip['ai'][ai_type] = target
else:
clip[type_] = target
os.makedirs(os.path.dirname(target), exist_ok=True)
if os.path.islink(target):
os.unlink(target)
os.symlink(source, target)