Skip to content

SplitDialogs: support Subtitle Edit Batch convert - #332

Merged
niksedk merged 1 commit into
mainfrom
claude/split-dialogs-batch
Oct 14, 2026
Merged

niksedk merged 1 commit into
mainfrom
claude/split-dialogs-batch

Conversation

@niksedk

@niksedk niksedk commented Oct 14, 2026

Copy link
Copy Markdown
Member

Adds Batch convert support (SubtitleEdit/subtitleedit#16036) to Split dialogs.

What it does

  • batch (once per file, no UI): splits every dialog line in the file using the saved options (Only split where the line before the dash ends a sentence, Gap between lines (ms)). ASSA/SSA stay in their native format, like a normal run. A file with no dialog lines returns ok without a subtitle. Settings are not returned.
  • configure (Batch convert's Configure...): the window opens with only the two options, a short "Batch convert settings" panel, and an OK button (always enabled). The preview list, column header and Select all/none are hidden. OK returns the settings + settingsVersion with no subtitle; Cancel returns cancelled.
  • plugin.json has "batch": true. SE 5.3 ignores it and only sends run. run works exactly as before.

Decisions

  • Batch applies what the window preselects: every row is checked by default, so batch splits every line the dialog rule accepts with the saved options. There are no per-item questions, so no extra batch-only setting was needed.
  • This plugin has no view model (the logic is in the window code-behind). To share the logic with the headless path without a refactor, settings load/save moved from MainWindow to a small SplitSettings record (same JSON keys and version 1, so saved settings carry over). The batch/configure responses live in a new BatchMode class.

Tests

  • New se5/SplitDialogs.Tests project (modelled on FixEncodingErrors.Tests) with BatchModeTests, 6 tests: default split, saved settings (rule off + gap), no dialogs = ok without subtitle, ASSA style/actor kept, configure response, settings round-trip/defaults. All pass.
  • split-dialogs.yml now has a test job (build waits for it) and the Tests path in its filters, like fix-encoding-errors.yml.
  • Ran the built dll end-to-end with a batch request.json: exit 0, the dialog split as in the README example (01,000-01,738 / 01,762-04,000).
  • Not checked by hand: the configure window in a real SE.

🤖 Generated with Claude Code

- plugin.json "batch": true
- batch request: split every dialog line with the saved options (all rows
  checked, the window's default), no UI; no dialogs = ok without subtitle
- configure request: options-only window, settings returned without subtitle
- settings load/save moved to SplitSettings so window and batch share them
- new SplitDialogs.Tests project, run by split-dialogs.yml

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@niksedk
niksedk merged commit 2fdc8cc into main Oct 14, 2026
10 checks passed
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