diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-29 14:17:33 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-29 14:17:33 +0200 |
| commit | 9f6414838d4fabc174bb193f34225de8d9fc8079 (patch) | |
| tree | 486f00b96a2174a783122c0e11a5d13c6c5ca965 /lib/data.lua | |
| parent | 4300fb5a232a2edf5262073ab7b898b8cbb126e4 (diff) | |
| download | conky-theme-udt-9f6414838d4fabc174bb193f34225de8d9fc8079.tar.gz conky-theme-udt-9f6414838d4fabc174bb193f34225de8d9fc8079.zip | |
feat(immich): fall back to the past week's memories
A day with no memories left the card showing only a notice. When today
has none, immich-fetch.sh now merges the memories of each of the past
six days, skipping a day whose request fails, and marks the index with
a scope week line. The subtitle names where the photos come from,
Today or This week, before the i/n counter, and the empty notice reads
no memories this week.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/data.lua')
| -rw-r--r-- | lib/data.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/data.lua b/lib/data.lua index 1173fce..c66aa42 100644 --- a/lib/data.lua +++ b/lib/data.lua @@ -594,7 +594,8 @@ end -- The Immich memories index written by bin/immich-fetch.sh. -- -- Returns a list of { id, year, taken = { y, m, d, H, M }, place }, plus --- .url, the server's address for a click-through, or nil when +-- .url, the server's address for a click-through, and .week, true when the +-- photos are the past week's fallback rather than today's, or nil when -- the index is absent or carries no 'generated' key. nil means "the fetch never -- ran"; an empty list means "no memories today", which the card names -- differently. `place` is nil when the key lacks asset.read or the photo has no @@ -608,6 +609,8 @@ function M.immich_parse(text) generated = true elseif kind == 'url' then out.url = rest + elseif kind == 'scope' then + out.week = rest == 'week' elseif kind == 'photo' then -- The place is last and takes the rest of the line, so a pipe in a -- place name cannot shift a field. |
