diff --git a/render.py b/render.py index ffbc43f..bef04a6 100644 --- a/render.py +++ b/render.py @@ -873,9 +873,6 @@ def generate_clips(options): source = e.files.filter(selected=True)[0].data.path ext = os.path.splitext(source)[1] type_ = e.data['type'][0].lower() - if type_ == "source": - source_target = target - clip['loudnorm'] = get_loudnorm(e.files.filter(selected=True)[0]) if type_.startswith('ai:'): if 'ai' not in clip: clip['ai'] = {} @@ -890,6 +887,9 @@ def generate_clips(options): 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 os.path.islink(target): os.unlink(target) os.symlink(source, target)