From 9d17a292bd067e560601e79a3a4a1f38ecc64f86 Mon Sep 17 00:00:00 2001 From: nikili0n Date: Tue, 26 Sep 2023 02:04:59 +0300 Subject: [PATCH 1/2] unkown stuff --- src/core/master_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/master_service.py b/src/core/master_service.py index 3ec13d3..ec0a239 100644 --- a/src/core/master_service.py +++ b/src/core/master_service.py @@ -101,7 +101,6 @@ class MasterService: "status": "done" }) except FileAlreadyExistException as ex: - # TODO: сделать так, чтобы грузился обычный, нам не нужно записывать что-то в редис return Result(result_type=ResultTypeEnum.EXIST, value={ "link": video_params["link"], "result": ex.message, @@ -119,6 +118,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 From a58b543529b1d643c719669f57a246614daa6ba5 Mon Sep 17 00:00:00 2001 From: nikili0n Date: Tue, 26 Sep 2023 15:41:30 +0300 Subject: [PATCH 2/2] change format defaults --- src/web/schemes/submit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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):