Update main.py
This commit is contained in:
parent
a5511bc57b
commit
ba65b1cc9d
10
main.py
10
main.py
@ -59,9 +59,13 @@ if not os.path.isdir(input_dir):
|
|||||||
print("❌ Path not found or not a directory:", input_dir)
|
print("❌ Path not found or not a directory:", input_dir)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# collect .m4b files robustly
|
# collect .m4b files robustly (skip hidden / ._ files)
|
||||||
all_files = [f for f in os.listdir(input_dir)
|
all_files = [
|
||||||
if os.path.isfile(os.path.join(input_dir, f)) and f.lower().endswith(".m4b")]
|
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:
|
if not all_files:
|
||||||
print("❌ No .m4b files found in that directory.")
|
print("❌ No .m4b files found in that directory.")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user