adjusted output folder bahavior
This commit is contained in:
@@ -209,12 +209,24 @@ def is_ffmpeg_decodable(file_path):
|
||||
|
||||
def main(no_downmix=False):
|
||||
check_tools()
|
||||
|
||||
current_dir = Path(".")
|
||||
|
||||
# Check if there are any MKV files to process before creating directories
|
||||
files_to_process = sorted(
|
||||
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-") or f.name.endswith(".cfr_temp.mkv"))
|
||||
)
|
||||
|
||||
if not files_to_process:
|
||||
print("No MKV files found to process. Exiting.")
|
||||
return # Exit without creating directories
|
||||
|
||||
# Only create directories when we actually have files to process
|
||||
DIR_COMPLETED.mkdir(exist_ok=True, parents=True)
|
||||
DIR_ORIGINAL.mkdir(exist_ok=True, parents=True)
|
||||
DIR_CONV_LOGS.mkdir(exist_ok=True, parents=True) # Create conv_logs directory
|
||||
|
||||
current_dir = Path(".")
|
||||
|
||||
while True:
|
||||
files_to_process = sorted(
|
||||
f for f in current_dir.glob("*.mkv")
|
||||
|
||||
@@ -161,16 +161,28 @@ def convert_video(source_file_base, source_file_full):
|
||||
|
||||
def main(no_downmix=False):
|
||||
check_tools()
|
||||
|
||||
current_dir = Path(".")
|
||||
|
||||
# Check if there are any MKV files to process before creating directories
|
||||
files_to_process = sorted(
|
||||
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 files_to_process:
|
||||
print("No MKV files found to process. Exiting.")
|
||||
return # Exit without creating directories
|
||||
|
||||
# Only create directories when we actually have files to process
|
||||
DIR_COMPLETED.mkdir(exist_ok=True, parents=True)
|
||||
DIR_ORIGINAL.mkdir(exist_ok=True, parents=True)
|
||||
DIR_LOGS.mkdir(exist_ok=True, parents=True)
|
||||
|
||||
current_dir = Path(".")
|
||||
|
||||
while True:
|
||||
files_to_process = sorted(
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user