5 Commits

4 changed files with 13 additions and 8 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

@@ -10,6 +10,9 @@ class PhotoGallery {
this.darkModeToggle = this.darkModeToggle.bind(this);
this.debounce = this.debounce.bind(this);
this.detectDarkMode = this.detectDarkMode.bind(this);
this.detectDarkMode();
this.filter = this.filter.bind(this);
this.finalize = this.finalize.bind(this);
this.insertPath = this.insertPath.bind(this);
@@ -203,7 +206,6 @@ class PhotoGallery {
this.setupDropdownToggle();
this.setupTagHandlers();
this.setupClickHandlers();
this.detectDarkMode();
window.addEventListener("scroll", this.scrollFunction);
}

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