Skip to content

Plugin contract: subtitle header, paragraphs and rules - #15658

Merged
niksedk merged 1 commit into
mainfrom
claude/arte-check-plugin-d178d6
Oct 4, 2026
Merged

niksedk merged 1 commit into
mainfrom
claude/arte-check-plugin-d178d6

Conversation

@niksedk

@niksedk niksedk commented Oct 4, 2026

Copy link
Copy Markdown
Member

EBU STL and other binary formats have no text form (Ebu.ToText returns Not supported!). Plugins only got SubRip, so they could not keep the GSI header or the teletext rows (MarginV) when they sent a result back. This blocked an ARTE delivery check as a plugin (see #15185).

Changes:

  • Request: subtitle.header (in-memory header) and subtitle.paragraphs (every Paragraph field: times in ms, text, style, actor, margins incl. marginV, layer, comment, ...). subtitle.native is now empty for binary formats instead of Not supported!.
  • Response: when subtitle.paragraphs is non-empty, SE applies the lines as-is (no re-parse) and keeps the current format. subtitle.header replaces the header; null keeps it. native keeps working as before.
  • request.rules: a read-only snapshot of the user's rules: min/max duration, max/optimal CPS, line length, max lines, minimum gap (ms + frames), frame mode, EBU box/double height, video offset. Plugins don't get the path to Settings.json, because SE rewrites that file on exit and its layout is internal.
  • docs/plugin.md documents the new fields.

All new fields are additive, so apiVersion stays at 1 and older plugins are unaffected.

Plugin that uses it: SubtitleEdit/plugins (ARTE check).

Tests: PluginParagraphsTests covers an EBU request carrying header and paragraphs, and a paragraphs response keeping teletext rows, replacing the header and keeping the EBU format. The existing PluginApplyKeepsOriginalTests still pass.

🤖 Generated with Claude Code

EBU STL and other binary formats have no text form (Ebu.ToText returns
"Not supported!"), so a plugin only saw SubRip and could not keep the
GSI header or the teletext rows (MarginV) when sending a result back.

- request.subtitle.header / .paragraphs: the in-memory header and every
  Paragraph field; native is empty for binary formats
- response.subtitle.paragraphs (+ optional header) is applied as-is,
  keeping the current format - no re-parse
- request.rules: read-only snapshot of durations, CPS, line length,
  minimum gap, frame mode, EBU box/double height and video offset, so
  plugins do not need Settings.json

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@niksedk
niksedk merged commit 8ea7024 into main Oct 4, 2026
1 check passed
@niksedk
niksedk deleted the claude/arte-check-plugin-d178d6 branch October 4, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant