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 <noreply@anthropic.com>
This commit is contained in:
2026-02-01 03:52:04 +03:00
parent b1cedcd317
commit f86839dab4
2 changed files with 2 additions and 2 deletions

View File

@@ -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: