fix generate
This commit is contained in:
parent
2b1e2e566b
commit
69344cc837
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue