ass_update_lines
Batch-edit selected ASS subtitle lines: apply shared field values, shift timing with pad_ms, and clamp times to prevent overlap with unselected lines.
Instructions
Change the same fields on every selected line.
Args:
selection: selection spelling (see module docstring); None = all.
doc_id: document to edit; the current one when omitted.
start_ms/end_ms/text/style/actor/effect/layer/comment/margin_l/margin_r/
margin_v: applied only to the lines you pass, as in
:func:ass_update_line.
pad_ms: widen every selected line by this many ms on both sides
(start -= pad_ms, end += pad_ms); negative values trim it.
clamp_to_avoid_overlap: after the edit, pull each selected line's times
back so it no longer overlaps an unselected line (best effort;
worst case a 10 ms line is left in the gap).
Returns {"doc_id", "changed": [<0-based indices>], "count", "clamped": [<0-based indices>], "fields": [field names], "lines": [<dict>, ...]}. Snapshot-backed. Line indices are 0-based.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| actor | No | ||
| layer | No | ||
| style | No | ||
| doc_id | No | ||
| effect | No | ||
| end_ms | No | ||
| pad_ms | No | ||
| comment | No | ||
| margin_l | No | ||
| margin_r | No | ||
| margin_v | No | ||
| start_ms | No | ||
| selection | Yes | ||
| clamp_to_avoid_overlap | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||