Skip to content

Commit

Permalink
added ext to gallery images meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Barakudum committed Mar 1, 2024
1 parent bed26f8 commit b8188a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/jarklin/cache/gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/jarklin/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class GalleryMeta(_t.TypedDict):

class GalleryImageMeta(_t.TypedDict):
filename: str
ext: str
width: int
height: int
filesize: int
Expand Down

0 comments on commit b8188a5

Please sign in to comment.