Repository navigation
feat(subtitles): prepare and commit external selections transactionally - #829
Merged
superuser404notfound merged 2 commits intoOct 21, 2026
Conversation
superuser404notfound
merged commit Oct 21, 2026
f301c79
into
superuser404notfound:main
4 checks passed
superuser404notfound
pushed a commit
that referenced
this pull request
Oct 21, 2026
…changelog for #829 A prepared commit rebuilt the primary takeover by hand and skipped three things the ordinary external select does: it left a running OCR worker armed, logged nothing (a commit was invisible in the diagnostic log), and did not re-assert the native rendition while the picture is off this device (Sodalite#156). Preparation and commit also refused a session mid-seek as stale, although `loadGeneration` already catches teardown; `.seeking` now counts as the same session. The AVERROR_EOF literals read `FFmpegErr.eof`, and the intent counter no longer sits between `loadGeneration` and its doc comment. The #819 and #827 changelog entries had landed under 7.40.0 and move to Unreleased with the #829 one, now in house style. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
Owner
|
Merged in f301c79, thanks @orut34iop. The branch still carried the pre-merge #826 commit, so three small conflicts (CHANGELOG, Follow-up in cb7c6fb:
|
superuser404notfound
pushed a commit
that referenced
this pull request
Oct 21, 2026
Owner
|
Released in 7.45.0 ( |
4 tasks done
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.
An external-subtitle picker currently has to change the active selection before it knows whether a downloaded file can be decoded. Add an opt-in prepare/commit/discard API: prepare a bounded local text sidecar without touching either channel, then synchronously publish the decoded candidate once. A failed preparation leaves the prior selection in place; commit does not reopen the file.
Candidates are bound to an engine, load/stop generation and shared primary/secondary selection intent. A newer selection, clear, removal or successful commit invalidates older candidates. Consumption precedes track-list publication, so a synchronous observer cannot consume the same handle twice. The same registered track can still occupy both channels; no host-specific exclusivity rule is added.
File validation and decoding run on the existing blocking worker. SRT/WebVTT/ASS/SSA input is forced by local extension, with configurable positive file/cue/text limits and no network protocols. Ordinary selection keeps its existing behavior. Prepared registry entries retain their preparation policy for reselection, and ASS uses the existing
preserveASSMarkupchoice.Dependency: this branch includes #826 (
58cc7eeb45b2f6e3d0bc47f68c1f53285adbfff9) because a prepared secondary ASS selection must publish its script header. After #826 merges, this PR's remaining diff is the transaction API. Other first/second-batch PRs are not included. Existing #239/#267 parsing and style support is reused; downloading and rendering remain host responsibilities.Tests cover unchanged old selection on failure, owner/discard/duplicate-commit checks, stop/load/selection invalidation, exact registered IDs, shared intent, cancellation, size/cue limits, symlinks, off-main metadata admission, commit after deleting the source file, same-track dual selection and ASS header/style preservation.
Validation on Apple Silicon (Mac17,3), macOS 26.7.1 / Swift 6.4:
swift build --build-testspassed; valid Apple Development signing/verification for test executables.stop()invalidation and the documented default-limit contract.git diff --checkpassed.Platform/optional-trait validation remains subject to upstream CI. No physical playback/device acceptance is claimed.