From 0447d6a805da048cbe6d407e2c6411d5e766d0cb Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:50:47 -0700 Subject: [PATCH] Update subgen.py Some error checking for transcribe_exiting() --- subgen/subgen.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subgen/subgen.py b/subgen/subgen.py index a830baf..490b3fb 100644 --- a/subgen/subgen.py +++ b/subgen/subgen.py @@ -478,9 +478,10 @@ def transcribe_existing(): for path in transcribe_folders: logging.debug(path) for root, dirs, files in os.walk(path): - for file in files: - file_path = os.path.join(root, file) - gen_subtitles(path_mapping(file_path), transcribe_or_translate, False) + if files: + for file in files: + file_path = os.path.join(root, file) + gen_subtitles(path_mapping(file_path), transcribe_or_translate, False) print("Finished searching and queueing files for transcription")