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; }}
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 '-'} |