From 64ec6ebc4880ac978fe65c6f687a4b55c4242ccb Mon Sep 17 00:00:00 2001 From: HighMans <42877729+HighMans@users.noreply.github.com> Date: Wed, 28 Jun 2023 19:32:11 -0400 Subject: [PATCH] Don't try and normalize folders. Prevents ffmpeg from trying to process a folder as a file and bombing out the program, usually occurs when passing in a wildcard as the input when a folder exists. --- ffmpeg_normalize/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ffmpeg_normalize/__main__.py b/ffmpeg_normalize/__main__.py index 1065959..5361b2d 100644 --- a/ffmpeg_normalize/__main__.py +++ b/ffmpeg_normalize/__main__.py @@ -558,7 +558,11 @@ def _split_options(opts: str) -> list[str]: error( f"Output file {output_file} already exists, skipping. Use -f to force overwriting." ) - + + if os.path.isdir(input_file): + _logger.warning(f"Folder {input_file} is not a file, skipping.") + continue + try: ffmpeg_normalize.add_media_file(input_file, output_file) except FFmpegNormalizeError as e: