From b8188a5db5f5db7f39cdc67749fbc7750202a8b8 Mon Sep 17 00:00:00 2001 From: PlayerG9 Date: Fri, 1 Mar 2024 13:37:22 +0100 Subject: [PATCH] added ext to gallery images meta --- src/jarklin/cache/gallery.py | 1 + src/jarklin/common/types.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/jarklin/cache/gallery.py b/src/jarklin/cache/gallery.py index d30acdb..ddbeacd 100644 --- a/src/jarklin/cache/gallery.py +++ b/src/jarklin/cache/gallery.py @@ -99,6 +99,7 @@ def meta_for_image(fp: PathSource) -> GalleryImageMeta: with Image.open(fp) as image: return GalleryImageMeta( filename=fp.name, + ext=fp.suffix, width=image.width, height=image.height, filesize=fp.stat().st_size, diff --git a/src/jarklin/common/types.py b/src/jarklin/common/types.py index 76f504b..28f3c3b 100644 --- a/src/jarklin/common/types.py +++ b/src/jarklin/common/types.py @@ -43,6 +43,7 @@ class GalleryMeta(_t.TypedDict): class GalleryImageMeta(_t.TypedDict): filename: str + ext: str width: int height: int filesize: int