From 927b650e86e9087eb1475cb9c868501c5611f6e4 Mon Sep 17 00:00:00 2001 From: Lucas Media Date: Mon, 9 Nov 2026 20:13:56 +0100 Subject: [PATCH] chore(ffmpeg_handling): formatting changes --- media_editing/ffmpeg_handling.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/media_editing/ffmpeg_handling.py b/media_editing/ffmpeg_handling.py index 5f62767..1d7b1e5 100755 --- a/media_editing/ffmpeg_handling.py +++ b/media_editing/ffmpeg_handling.py @@ -166,6 +166,7 @@ class ArgsBuffer: suffix: str | None = None new_suffix: str | None = None + CYRILLIC_RE = re.compile(r"[А-Яа-яЁё]") @@ -1474,7 +1475,9 @@ def cmd_test(args): "video_codecs": ["h264"], } ] - ret = ret and run_and_probe(cmd_test["name"], cmd_downsize, args_test, test_dict) + ret = ret and run_and_probe( + cmd_test["name"], cmd_downsize, args_test, test_dict + ) # ---------- REMOVE AUDIO TRACK ---------- cmd_test = commands["remove-audio"] @@ -1530,9 +1533,9 @@ def cmd_test(args): args_test.input = test_file args_test.suffix = ".mkv" args_test.output = ( - Path(test_dir) - / f"out_{str(cmd_test['name']).replace('-', '_')}_{Path(test_file).stem}_" - f"{Path(test_file).suffix.replace(".","")}_{args_test.suffix}" + Path(test_dir) + / f"out_{str(cmd_test['name']).replace('-', '_')}_{Path(test_file).stem}_" + f"{Path(test_file).suffix.replace('.', '')}_{args_test.suffix}" ) args_test.video_codec = "libx264" args_test.audio_codec = "aac" @@ -1564,8 +1567,8 @@ def cmd_test(args): args_test.suffix = ".avi" args_test.new_suffix = ".mp4" args_test.output = ( - Path(test_dir) - / f"out_{str(cmd_test['name']).replace('-', '_')}_{Path(test_file).stem}{args_test.new_suffix}" + Path(test_dir) + / f"out_{str(cmd_test['name']).replace('-', '_')}_{Path(test_file).stem}{args_test.new_suffix}" ) args_test.video_codec = "libx264" args_test.audio_codec = "aac" @@ -1582,8 +1585,12 @@ def cmd_test(args): test_dict[0]["video_codecs"] = ["h264"] test_dict[0]["audio_codecs"] = ["aac"] if test_file.suffix != args_test.suffix: - test_dict[0]["video_codecs"] = [s.get("codec_name") for s in video_streams] - test_dict[0]["audio_codecs"] = [s.get("codec_name") for s in video_streams] + test_dict[0]["video_codecs"] = [ + s.get("codec_name") for s in video_streams + ] + test_dict[0]["audio_codecs"] = [ + s.get("codec_name") for s in video_streams + ] ret = ret and run_and_probe( cmd_test["name"], cmd_convert_av_all_suffix, args_test, test_dict @@ -1795,7 +1802,9 @@ def cmd_test(args): "metadata": {"artist": "TEST"}, } ] - ret = ret and run_and_probe(cmd_test["name"], cmd_set_metadata, args_test, test_dict) + ret = ret and run_and_probe( + cmd_test["name"], cmd_set_metadata, args_test, test_dict + ) # ---------- REMOVE RUSSIAN AUDIO ----- cmd_test = commands["remove-russian-from-db"]