Repository navigation
Plugin contract: subtitle header, paragraphs and rules - #15658
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EBU STL and other binary formats have no text form (
Ebu.ToTextreturnsNot 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:
subtitle.header(in-memory header) andsubtitle.paragraphs(everyParagraphfield: times in ms, text, style, actor, margins incl.marginV, layer, comment, ...).subtitle.nativeis now empty for binary formats instead ofNot supported!.subtitle.paragraphsis non-empty, SE applies the lines as-is (no re-parse) and keeps the current format.subtitle.headerreplaces the header; null keeps it.nativekeeps 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 toSettings.json, because SE rewrites that file on exit and its layout is internal.docs/plugin.mddocuments the new fields.All new fields are additive, so
apiVersionstays at 1 and older plugins are unaffected.Plugin that uses it: SubtitleEdit/plugins (ARTE check).
Tests:
PluginParagraphsTestscovers an EBU request carrying header and paragraphs, and a paragraphs response keeping teletext rows, replacing the header and keeping the EBU format. The existingPluginApplyKeepsOriginalTestsstill pass.🤖 Generated with Claude Code