From 184ccf1ac4231115747ffc407dc0124a9cfb7a30 Mon Sep 17 00:00:00 2001 From: "azykov@mail.ru" Date: Sun, 16 Aug 2026 21:09:01 +0300 Subject: [PATCH] photo-stats now count to year ago exactly --- clusters/base/apps/photo-stats/configmap.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clusters/base/apps/photo-stats/configmap.yaml b/clusters/base/apps/photo-stats/configmap.yaml index 711aa65..afa76f4 100644 --- a/clusters/base/apps/photo-stats/configmap.yaml +++ b/clusters/base/apps/photo-stats/configmap.yaml @@ -13,12 +13,15 @@ data: ROOT = "/mnt/sdb2/immich/uploads/library" OUT_DIR = "/www" - CUTOFF = datetime(2025, 1, 1, tzinfo=timezone.utc).timestamp() + current_date = datetime.now(timezone.utc) + cutoff_date = current_date.replace(year=current_date.year - 1) + CUTOFF = cutoff_date.timestamp() RESCAN_INTERVAL_SECONDS = 6 * 3600 state_lock = threading.Lock() state = { "status": "starting", + "cutoff_at": cutoff_date.isoformat(), "processed": 0, "total": 0, "percent": 0.0, @@ -64,15 +67,14 @@ data: .err {{ color: #f66; }}

Photo library stats

-

Path: {ROOT}

Status: {s['status']}

{progress_html} {error_html} - - + +
Total files{s['total_files']}
Total size{human_size(s['total_size'])} ({s['total_size']} bytes)
Files newer than 2025-01-01{s['recent_files']}
Size of files newer than 2025-01-01{human_size(s['recent_size'])} ({s['recent_size']} bytes)
Files newer than {s['cutoff_at']}{s['recent_files']}
Size of files newer than {s['cutoff_at']}{human_size(s['recent_size'])} ({s['recent_size']} bytes)
Last scan started{s['started_at'] or '-'}
Last scan finished{s['finished_at'] or '-'}