Merge remote-tracking branch 'origin/main'

This commit is contained in:
nikili0n 2023-09-26 16:33:09 +03:00 committed by Dantenerosas
commit 9728287569
2 changed files with 8 additions and 4 deletions

View File

@ -102,7 +102,6 @@ class MasterService:
"status": "done"
})
except FileAlreadyExistException as ex:
# TODO: сделать так, чтобы грузился обычный, нам не нужно записывать что-то в редис
return Result(result_type=ResultTypeEnum.EXIST, value={
"link": video_params["link"],
"result": ex.message,
@ -120,6 +119,11 @@ class MasterService:
"result": traceback.format_exc(),
"status": "error"
})
return Result(result_type=ResultTypeEnum.EXCEPTION, value={
"link": video_params["link"],
"result": "Unknown exception encountered",
"status": "error"
})
# TODO upload to server

View File

@ -40,9 +40,9 @@ class MergeOutputFormatEnum(Enum):
@dataclass
class SubmitIn:
link: str = Form(...)
video_format: VideoFormatEnum = Form(default=MergeOutputFormatEnum.format_mp4)
audio_format: AudioFormatEnum = Form(default=AudioFormatEnum.format_m4a)
merge_output_format: MergeOutputFormatEnum = Form(default=MergeOutputFormatEnum.format_mp4)
video_format: VideoFormatEnum = Form(default=MergeOutputFormatEnum.format_webm)
audio_format: AudioFormatEnum = Form(default=AudioFormatEnum.format_webm)
merge_output_format: MergeOutputFormatEnum = Form(default=MergeOutputFormatEnum.format_mkv)
class CheckIn(BaseModel):