diff --git a/src/core/master_service.py b/src/core/master_service.py index 217886a..6cc50f7 100644 --- a/src/core/master_service.py +++ b/src/core/master_service.py @@ -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 diff --git a/src/web/schemes/submit.py b/src/web/schemes/submit.py index 832e987..2f5fcb3 100644 --- a/src/web/schemes/submit.py +++ b/src/web/schemes/submit.py @@ -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):