From 9f6414838d4fabc174bb193f34225de8d9fc8079 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 29 Sep 2026 14:17:33 +0200 Subject: 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 --- lib/data.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/data.lua') 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. -- cgit v1.2.3