Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion subtle_gui/formats/pgssubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ def _readData(self, path: Path) -> None:
frames = []
for ds in data:
state = ds.pcs.compState
if state == COMP_EPOCH:
if state == COMP_EPOCH or (state == COMP_ACQ and not frame):
# Start of a new subtitles frame.
# We assume that acquisition frames after closed frames are also valid subtitles.
# These sometimes occur, and I'm not really sure why.
frame = PGSFrame(len(frames), ds)
frames.append(frame)
elif ds.isClearFrame() and frame:
Expand Down
2 changes: 1 addition & 1 deletion subtle_gui/ocr/tesseract.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

RX_REPLACE = {
"all": [
(re.compile(r"^(-\s)[\w]", re.UNICODE), "-"),
# (re.compile(r"^(-\s)[\w]", re.UNICODE), "-"),
(re.compile(r"^(\.{2})[\s\w]", re.UNICODE), "..."),
(re.compile(r"^(\.{3}\s)\w", re.UNICODE), "..."),
# Wrong capitalisation in the middle of words
Expand Down