Separate decoder state from the Subtitle model

Open
#99 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
swift
Domain
desktop, mobile

Research direction

Start by reading the Subtitle model and the VobSub decoder and SRT encoder code that use evenOffset, oddOffset, and imageAlpha. Trace which code owns and mutates each value, then identify decoder-local state and the changes needed to make Subtitle an immutable value. Done when VobSub decoding keeps its state locally, Subtitle is immutable, and SRT encoding no longer mutates it.

Written by the indexing model from the issue text.

Description

enhancement

Subtitle is a mutable @unchecked Sendable class carrying VobSub-only decode state (evenOffset, oddOffset, imageAlpha) that SRT also mutates while encoding. Move decoder state into decoder-local structs and make Subtitle an immutable value.

Dominant language
Swift
Stars
42
Forks
9
Avg merge
9h 30m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ecdye/macSubtitleOCR

All issues in ecdye/macSubtitleOCR

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.