easy-media-track-gate: allow an empty media_inventory (pure t2v stories)

A story with no pictures/audio/video at all is valid: outline.media_inventory
may now be []. With zero media rows the override builder emits no media tokens
and the track validator enforces that none appear; the runtime parser then
demands no image/audio/video inputs, so nothing needs wiring into the editor.
Example suite regression-checked unchanged.
This commit is contained in:
Z User 2026-11-01 02:42:30 +00:00
parent fd874adbd3
commit 5ab7096cfc

View File

@ -294,8 +294,10 @@ def prompt_rules(user_prompt: str, continuity_mode: str, followed_by_join: bool,
def _validate_media_inventory(outline: dict[str, Any]) -> dict[str, dict[str, Any]]: def _validate_media_inventory(outline: dict[str, Any]) -> dict[str, dict[str, Any]]:
rows = outline.get("media_inventory") rows = outline.get("media_inventory")
if not isinstance(rows, list) or not rows: if not isinstance(rows, list):
raise Fail("outline.media_inventory must be a non-empty array of media rows") raise Fail(
"outline.media_inventory must be an array of media rows — use [] for a pure "
"t2v story with no media at all (no picture tokens may then appear in prompts)")
inventory: dict[str, dict[str, Any]] = {} inventory: dict[str, dict[str, Any]] = {}
for i, row in enumerate(rows): for i, row in enumerate(rows):
where = f"media_inventory[{i}]" where = f"media_inventory[{i}]"