fix ai symlinks
This commit is contained in:
parent
69344cc837
commit
90f1954317
1 changed files with 5 additions and 3 deletions
|
|
@ -883,13 +883,15 @@ def generate_clips(options):
|
||||||
n += 1
|
n += 1
|
||||||
clip['ai'][ai_type] = target
|
clip['ai'][ai_type] = target
|
||||||
type_ = ai_type
|
type_ = ai_type
|
||||||
else:
|
|
||||||
clip[type_] = target
|
|
||||||
target = os.path.join(prefix, 'video', type_, i.data['title'] + ext)
|
target = os.path.join(prefix, 'video', type_, i.data['title'] + ext)
|
||||||
os.makedirs(os.path.dirname(target), exist_ok=True)
|
|
||||||
if type_ == "source":
|
if type_ == "source":
|
||||||
source_target = target
|
source_target = target
|
||||||
clip['loudnorm'] = get_loudnorm(e.files.filter(selected=True)[0])
|
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):
|
if os.path.islink(target):
|
||||||
os.unlink(target)
|
os.unlink(target)
|
||||||
os.symlink(source, target)
|
os.symlink(source, target)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue