diff --git a/main.py b/main.py index 0e43173..4c26d77 100644 --- a/main.py +++ b/main.py @@ -59,9 +59,13 @@ if not os.path.isdir(input_dir): print("❌ Path not found or not a directory:", input_dir) sys.exit(1) -# collect .m4b files robustly -all_files = [f for f in os.listdir(input_dir) - if os.path.isfile(os.path.join(input_dir, f)) and f.lower().endswith(".m4b")] +# collect .m4b files robustly (skip hidden / ._ files) +all_files = [ + f for f in os.listdir(input_dir) + if os.path.isfile(os.path.join(input_dir, f)) + and f.lower().endswith(".m4b") + and not f.startswith(".") # skip hidden macOS resource files +] if not all_files: print("❌ No .m4b files found in that directory.")