Repository navigation
Fix Skip Already Transcribed for file names with square brackets - #1659
Open
Dev-next-gen wants to merge 1 commit into
Open
Dev-next-gen wants to merge 1 commit into
Dev-next-gen wants to merge 1 commit into
Conversation
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
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.
With the Skip Already Transcribed plugin enabled, a media file whose name contains glob characters is never skipped.
Interview [Part 1].mp3sits 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_segmentsbuilds the patternf"{stem}*.{fmt.value}"from the raw file name, soPath.globreads[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 throughglob.escape.I reproduced it through the real naming and writing path:
get_output_file_pathwith the default template pluswrite_outputproduced the.srtabove, andcheck_skipreturnedNone. With the fix it returns the segment. The added testtest_sat_skips_on_srt_file_with_brackets_in_namefails before the change and passes after, along with the othersat_tests.Found by a defect-hunting pipeline I build and run (Dev-next-gen), using Claude Code with Anthropic's Claude Opus 5.5.