From ca8bb3894990014df48cdcb273c518076682f11a Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 5 Apr 2023 00:34:17 -0300 Subject: [PATCH] Simplify gallery --- extensions/gallery/script.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/extensions/gallery/script.py b/extensions/gallery/script.py index f14dfd76..5c47f0f1 100644 --- a/extensions/gallery/script.py +++ b/extensions/gallery/script.py @@ -66,13 +66,7 @@ def generate_html(): container_html = '
' image_html = "
" - 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'' break