fixed extension exclude

This commit is contained in:
2025-10-22 14:53:07 +02:00
parent d1bf0fbc9a
commit f24a24bcd2

View File

@@ -428,7 +428,7 @@ def generate_html(folder: str, title: str, _args: Args, raw: list[str], version:
logger.info("processing contents", extra={"folder": folder}) logger.info("processing contents", extra={"folder": folder})
if not _args.non_interactive_mode: if not _args.non_interactive_mode:
for item in tqdm(items, total=len(items), desc=f"Getting image infos - {folder}", unit="files", ascii=True, dynamic_ncols=True): for item in tqdm(items, total=len(items), desc=f"Getting image infos - {folder}", unit="files", ascii=True, dynamic_ncols=True):
if item not in EXCLUDES and not item.startswith(".") and os.path.splitext(item)[1].lower() not in _args.ignore_extensions: if item not in EXCLUDES and not item.startswith(".") and os.path.splitext(item)[1][1:].lower() not in _args.ignore_extensions:
if os.path.isdir(os.path.join(folder, item)): if os.path.isdir(os.path.join(folder, item)):
subfoldertags.update(process_subfolder(item, folder, baseurl, subfolders, _args, raw, version, logo)) subfoldertags.update(process_subfolder(item, folder, baseurl, subfolders, _args, raw, version, logo))
else: else:
@@ -442,7 +442,7 @@ def generate_html(folder: str, title: str, _args: Args, raw: list[str], version:
process_license(folder, item) process_license(folder, item)
else: else:
for item in items: for item in items:
if item not in EXCLUDES and not item.startswith(".") and os.path.splitext(item)[1].lower() not in _args.ignore_extensions: if item not in EXCLUDES and not item.startswith(".") and os.path.splitext(item)[1][1:].lower() not in _args.ignore_extensions:
if os.path.isdir(os.path.join(folder, item)): if os.path.isdir(os.path.join(folder, item)):
subfoldertags.update(process_subfolder(item, folder, baseurl, subfolders, _args, raw, version, logo)) subfoldertags.update(process_subfolder(item, folder, baseurl, subfolders, _args, raw, version, logo))
else: else: