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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user