From f86839dab452ad52462b1d09c5acf2641426aa73 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Sun, 1 Feb 2026 03:52:04 +0300 Subject: [PATCH] Fix per-album limit calculation in combined mode Fixed Jinja2 operator precedence issue where `limit | int // count | int` was being parsed ambiguously. Added explicit parentheses to ensure correct floor division: `((limit | int) // (count | int))`. Co-Authored-By: Claude Opus 4.5 --- Common/Immich Album Watcher/blueprint.yaml | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Immich Album Watcher/blueprint.yaml b/Common/Immich Album Watcher/blueprint.yaml index 95d37d6..d2aa6ec 100644 --- a/Common/Immich Album Watcher/blueprint.yaml +++ b/Common/Immich Album Watcher/blueprint.yaml @@ -1407,7 +1407,7 @@ action: all_fetched_assets: [] # Calculate per-album limit (use floor division for even distribution, minimum 1) album_count: "{{ album_id_entities | length }}" - per_album_limit: "{{ [(scheduled_assets_limit | int // album_count | int), 1] | max if album_count | int > 0 else scheduled_assets_limit | int }}" + per_album_limit: "{{ [((scheduled_assets_limit | int) // (album_count | int)), 1] | max if album_count | int > 0 else scheduled_assets_limit | int }}" # Fetch assets from each album with distributed limit - repeat: diff --git a/manifest.json b/manifest.json index 243b20a..1309f47 100644 --- a/manifest.json +++ b/manifest.json @@ -1,3 +1,3 @@ { - "version": "1.22.5" + "version": "1.22.6" }