feat(ffmpeg_handling): move tag function and SUFFIX array to serverlibrary
This commit is contained in:
1 parent
95dc00b070
commit
3b70209bc2
3 files changed
+42
-24
No files matched your search
@@ -1160,11 +1160,6 @@ def cmd_test(args):
|
||||
test_dir = Path(tempfile.mkdtemp(prefix="ffmpeg_test_"))
|
||||
logger.info(f"Using test dir: {test_dir}")
|
||||
|
||||
def red_tag(tag: str) -> str:
|
||||
return f"{red}[{tag}]{reset}"
|
||||
|
||||
def green_tag(tag: str) -> str:
|
||||
return f"{green}[{tag}]{reset}"
|
||||
|
||||
def run_and_probe(name, cmd_func, args_probe, _test_dict=None):
|
||||
if _test_dict is None:
|
||||
@@ -2215,7 +2210,7 @@ def main():
|
||||
(
|
||||
p
|
||||
for p in input_path.rglob("*")
|
||||
if p.is_file() and p.suffix.lower() in VIDEO_EXTS
|
||||
if p.is_file() and p.suffix.lower() in VIDEO_SUFFIXES
|
||||
),
|
||||
key=natural_sort_key,
|
||||
)
|
||||
@@ -2224,14 +2219,14 @@ def main():
|
||||
(
|
||||
p
|
||||
for p in input_path.iterdir()
|
||||
if p.is_file() and p.suffix.lower() in VIDEO_EXTS
|
||||
if p.is_file() and p.suffix.lower() in VIDEO_SUFFIXES
|
||||
),
|
||||
key=natural_sort_key,
|
||||
)
|
||||
for file in sorted_files:
|
||||
if (
|
||||
file.suffix.lower() not in VIDEO_EXTS
|
||||
and file.suffix.lower() not in AUDIO_EXTS
|
||||
file.suffix.lower() not in VIDEO_SUFFIXES
|
||||
and file.suffix.lower() not in AUDIO_SUFFIXES
|
||||
):
|
||||
continue
|
||||
logger.trace(f"Processing File: {file}")
|
||||
|
||||
Reference in new issue
Block a user