mirror of
https://github.com/tcsenpai/pensieve.git
synced 2025-06-10 21:17:14 +00:00
fix: use str instead of path
This commit is contained in:
parent
36c4bf7c5f
commit
0d371d759e
@ -29,7 +29,7 @@ def get_image_metadata(image_path):
|
|||||||
image_path_str = str(image_path)
|
image_path_str = str(image_path)
|
||||||
|
|
||||||
if image_path_str.lower().endswith((".jpg", ".jpeg", ".tiff")):
|
if image_path_str.lower().endswith((".jpg", ".jpeg", ".tiff")):
|
||||||
exif_dict = piexif.load(image_path)
|
exif_dict = piexif.load(str(image_path)) # Convert Path object to string
|
||||||
existing_description = exif_dict["0th"].get(
|
existing_description = exif_dict["0th"].get(
|
||||||
piexif.ImageIFD.ImageDescription, b"{}"
|
piexif.ImageIFD.ImageDescription, b"{}"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user