添加util.flask;video_clip编辑逻辑

This commit is contained in:
2022-04-19 09:42:39 +08:00
parent 3f5df9df29
commit df20bab1ac
5 changed files with 105 additions and 18 deletions

View File

@ -17,7 +17,10 @@ class VideoClip(db.Model):
@property
def full_path(self):
return os.path.abspath(os.path.join(self.base_path, self.file))
if self.base_path is not None and self.base_path != "":
return os.path.abspath(os.path.join(self.base_path, self.file))
else:
return os.path.abspath(self.file)
def to_json(self):
return {
@ -26,4 +29,5 @@ class VideoClip(db.Model):
"file": self.file,
"duration": self.duration,
"offset": self.offset,
"workflow_id": self.workflow_id,
}