chore(ffmpeg_handling): formatting changes

This commit is contained in:
lucas committed 2026-11-09 20:16:32 +01:00
1 parent c415bc10c6
commit 927b650e86
1 file changed
+18 -9
+18 -9
View File
@@ -166,6 +166,7 @@ class ArgsBuffer:
suffix: str | None = None suffix: str | None = None
new_suffix: str | None = None new_suffix: str | None = None
CYRILLIC_RE = re.compile(r"[А-Яа-яЁё]") CYRILLIC_RE = re.compile(r"[А-Яа-яЁё]")
@@ -1474,7 +1475,9 @@ def cmd_test(args):
"video_codecs": ["h264"], "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 ---------- # ---------- REMOVE AUDIO TRACK ----------
cmd_test = commands["remove-audio"] cmd_test = commands["remove-audio"]
@@ -1530,9 +1533,9 @@ def cmd_test(args):
args_test.input = test_file args_test.input = test_file
args_test.suffix = ".mkv" args_test.suffix = ".mkv"
args_test.output = ( args_test.output = (
Path(test_dir) Path(test_dir)
/ f"out_{str(cmd_test['name']).replace('-', '_')}_{Path(test_file).stem}_" / f"out_{str(cmd_test['name']).replace('-', '_')}_{Path(test_file).stem}_"
f"{Path(test_file).suffix.replace(".","")}_{args_test.suffix}" f"{Path(test_file).suffix.replace('.', '')}_{args_test.suffix}"
) )
args_test.video_codec = "libx264" args_test.video_codec = "libx264"
args_test.audio_codec = "aac" args_test.audio_codec = "aac"
@@ -1564,8 +1567,8 @@ def cmd_test(args):
args_test.suffix = ".avi" args_test.suffix = ".avi"
args_test.new_suffix = ".mp4" args_test.new_suffix = ".mp4"
args_test.output = ( args_test.output = (
Path(test_dir) Path(test_dir)
/ f"out_{str(cmd_test['name']).replace('-', '_')}_{Path(test_file).stem}{args_test.new_suffix}" / f"out_{str(cmd_test['name']).replace('-', '_')}_{Path(test_file).stem}{args_test.new_suffix}"
) )
args_test.video_codec = "libx264" args_test.video_codec = "libx264"
args_test.audio_codec = "aac" args_test.audio_codec = "aac"
@@ -1582,8 +1585,12 @@ def cmd_test(args):
test_dict[0]["video_codecs"] = ["h264"] test_dict[0]["video_codecs"] = ["h264"]
test_dict[0]["audio_codecs"] = ["aac"] test_dict[0]["audio_codecs"] = ["aac"]
if test_file.suffix != args_test.suffix: if test_file.suffix != args_test.suffix:
test_dict[0]["video_codecs"] = [s.get("codec_name") for s in video_streams] test_dict[0]["video_codecs"] = [
test_dict[0]["audio_codecs"] = [s.get("codec_name") for s in video_streams] 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( ret = ret and run_and_probe(
cmd_test["name"], cmd_convert_av_all_suffix, args_test, test_dict cmd_test["name"], cmd_convert_av_all_suffix, args_test, test_dict
@@ -1795,7 +1802,9 @@ def cmd_test(args):
"metadata": {"artist": "TEST"}, "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 ----- # ---------- REMOVE RUSSIAN AUDIO -----
cmd_test = commands["remove-russian-from-db"] cmd_test = commands["remove-russian-from-db"]