2 Commits

Author SHA1 Message Date
ebce2aa21d handle exceptions when extracting EXIF and XMP data from images 2026-04-02 12:47:54 +02:00
4789dd6232 yeah 2026-03-24 12:52:19 +01:00
3 changed files with 10 additions and 7 deletions

View File

@@ -26,7 +26,7 @@
"-p",
"${workspaceFolder}/test",
"-w",
"file://${workspaceFolder}/test",
"http://localhost/",
"-t",
"Pictures",
"--theme",
@@ -141,9 +141,6 @@
"**/*.css": "css",
"**/*.html.j2": "jinja-html"
},
"gitblame.inlineMessageEnabled": true,
"gitblame.inlineMessageFormat": "${author.name}, ${time.ago} • ${commit.summary}",
"gitblame.statusBarMessageFormat": "${author.name} (${time.ago})",
"html.format.indentHandlebars": true,
"html.format.templating": true,
"html.format.wrapAttributes": "preserve",

View File

@@ -168,8 +168,14 @@ def get_image_info(item: str, folder: str) -> ImageMetadata:
with Image.open(file) as img:
logger.info("extracting image information", extra={"file": file})
width, height = img.size
exif = img.getexif()
xmpdata = img.getxmp()
try:
exif = img.getexif()
except Exception:
exif = None
try:
xmpdata = img.getxmp()
except Exception:
xmpdata = None
except UnidentifiedImageError:
logger.error("cannot identify image file", extra={"file": file})

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash
LESS=-SR hl $(ls -tr logs/*.{jsonl,jsonl.gz}) --config hl_config.yaml
LESS=-SR hl "$(ls -tr logs/*.{jsonl,jsonl.gz})" --config hl_config.yaml