改改bug

This commit is contained in:
2025-01-13 10:33:36 +08:00
parent ce469dacf2
commit 92160b05ea
5 changed files with 22 additions and 18 deletions

View File

@ -85,11 +85,12 @@ def download_template(template_id):
if 'source' in _template:
if str(_template['source']).startswith("http"):
_, _fn = os.path.split(_template['source'])
oss.download_from_oss(_template['source'], os.path.join(template_info['local_path'], _fn))
new_fp = os.path.join(template_info['local_path'], _fn)
oss.download_from_oss(_template['source'], new_fp)
if _fn.endswith(".mp4"):
from util.ffmpeg import to_annexb
_fn = to_annexb(os.path.join(template_info['local_path'], _fn))
_template['source'] = os.path.relpath(_fn, template_info['local_path'])
new_fp = to_annexb(new_fp)
_template['source'] = os.path.relpath(new_fp, template_info['local_path'])
if 'overlays' in _template:
for i in range(len(_template['overlays'])):
overlay = _template['overlays'][i]