Skip to content

Fix Skip Already Transcribed for file names with square brackets - #1659

Open
Dev-next-gen wants to merge 1 commit into
chidiwilliams:mainfrom
Dev-next-gen:fix/skip-transcribed-glob-escape
Open

Dev-next-gen wants to merge 1 commit into
chidiwilliams:mainfrom
Dev-next-gen:fix/skip-transcribed-glob-escape

Conversation

@Dev-next-gen

Copy link
Copy Markdown

With the Skip Already Transcribed plugin enabled, a media file whose name contains glob characters is never skipped. Interview [Part 1].mp3 sits next to the result Buzz wrote for it, Interview [Part 1] (transcribed on 14-Oct-2026 13-02-51).srt, and the file is transcribed again.

_find_result_file_segments builds the pattern f"{stem}*.{fmt.value}" from the raw file name, so Path.glob reads [Part 1] as a character class matching a single character and the result file does not match. Square brackets are common in downloaded media names. The fix passes the stem through glob.escape.

I reproduced it through the real naming and writing path: get_output_file_path with the default template plus write_output produced the .srt above, and check_skip returned None. With the fix it returns the segment. The added test test_sat_skips_on_srt_file_with_brackets_in_name fails before the change and passes after, along with the other sat_ tests.

Found by a defect-hunting pipeline I build and run (Dev-next-gen), using Claude Code with Anthropic's Claude Opus 5.5.

A media file whose name contains glob characters, for example
"Interview [Part 1].mp3", never matched its own result file because
Path.glob read "[Part 1]" as a character class, so the file was
transcribed again.

This branch has not been deployed

No deployments
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