mirror of
https://github.com/greflm13/StaticGalleryBuilder.git
synced 2026-02-05 11:09:26 +00:00
moved into if
This commit is contained in:
@@ -171,8 +171,8 @@ def list_folder(folder: str, title: str) -> None:
|
|||||||
else:
|
else:
|
||||||
extsplit = os.path.splitext(item)
|
extsplit = os.path.splitext(item)
|
||||||
contains_files = True
|
contains_files = True
|
||||||
beforeimage = time.time()
|
|
||||||
if extsplit[1].lower() in args.file_extensions:
|
if extsplit[1].lower() in args.file_extensions:
|
||||||
|
beforeimage = time.time()
|
||||||
with Image.open(os.path.join(folder, item)) as img:
|
with Image.open(os.path.join(folder, item)) as img:
|
||||||
width, height = img.size
|
width, height = img.size
|
||||||
image = {
|
image = {
|
||||||
@@ -192,11 +192,11 @@ def list_folder(folder: str, title: str) -> None:
|
|||||||
else:
|
else:
|
||||||
image["raw"] = f"{args.web_root_url}{baseurl}{url}"
|
image["raw"] = f"{args.web_root_url}{baseurl}{url}"
|
||||||
images.append(image)
|
images.append(image)
|
||||||
|
imagetime = time.time() - beforeimage
|
||||||
if item == "info":
|
if item == "info":
|
||||||
with open(os.path.join(folder, item), encoding="utf-8") as f:
|
with open(os.path.join(folder, item), encoding="utf-8") as f:
|
||||||
_info = f.read()
|
_info = f.read()
|
||||||
info[urllib.parse.quote(folder)] = _info
|
info[urllib.parse.quote(folder)] = _info
|
||||||
imagetime = time.time() - beforeimage
|
|
||||||
print(f"Getting infos for {os.path.join(folder, item)} took {imagetime:.2f} seconds")
|
print(f"Getting infos for {os.path.join(folder, item)} took {imagetime:.2f} seconds")
|
||||||
if not args.non_interactive_mode:
|
if not args.non_interactive_mode:
|
||||||
pbar.desc = f"Generating HTML files - {folder}"
|
pbar.desc = f"Generating HTML files - {folder}"
|
||||||
|
|||||||
Reference in New Issue
Block a user