Empty cues produce malformed SRT

Open Beginner friendly
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
swift
Domain
backend, desktop

Research direction

Start at the code that writes SRT cues and reports empty OCR results to stderr; the issue does not name files or tests. Trace how cue indexes are assigned, then check the generated SRT to confirm empty cues are omitted, remaining cues are renumbered, and empty cues are still reported on stderr.

Written by the indexing model from the issue text.

Description

bug

A subtitle with no recognized text is written as an index line, a timing line, and an empty body followed by the separator, i.e. two blank lines. Several SRT parsers treat that as a malformed cue.

Fix: skip empty cues in the SRT (still reported on stderr) and renumber the rest.

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.