Simplify gallery

This commit is contained in:
oobabooga 2023-04-05 00:34:17 -03:00
parent 4ab679480e
commit ca8bb38949

View File

@ -66,13 +66,7 @@ def generate_html():
container_html = '<div class="character-container">'
image_html = "<div class='placeholder'></div>"
for i in [
f"characters/{character}.png",
f"characters/{character}.jpg",
f"characters/{character}.jpeg",
]:
path = Path(i)
for path in [Path(f"characters/{character}.{extension}") for extension in ['png', 'jpg', 'jpeg']]:
if path.exists():
image_html = f'<img src="file/{get_image_cache(path)}">'
break