Changed the loop to recheck for newly added MKV files #1

Merged
pat-e merged 1 commits from version1 into main 2025-07-17 07:52:17 +02:00
Showing only changes of commit b7250156b4 - Show all commits

View File

@@ -153,16 +153,18 @@ def main(no_downmix=False):
DIR_ORIGINAL.mkdir(exist_ok=True, parents=True) DIR_ORIGINAL.mkdir(exist_ok=True, parents=True)
current_dir = Path(".") current_dir = Path(".")
while True:
files_to_process = sorted( files_to_process = sorted(
f for f in current_dir.glob("*.mkv") f for f in current_dir.glob("*.mkv")
if not (f.name.endswith(".ut.mkv") or f.name.startswith("temp-") or f.name.startswith("output-")) if not (f.name.endswith(".ut.mkv") or f.name.startswith("temp-") or f.name.startswith("output-") )
) )
if not files_to_process: if not files_to_process:
print("No .mkv files found to process in the current directory.") print("No more .mkv files found to process in the current directory. The script will now exit.")
return break
for file_path in files_to_process: file_path = files_to_process[0]
print("-" * shutil.get_terminal_size(fallback=(80, 24)).columns) print("-" * shutil.get_terminal_size(fallback=(80, 24)).columns)
print(f"Starting full processing for: {file_path.name}") print(f"Starting full processing for: {file_path.name}")
date = datetime.now() date = datetime.now()