Skip to content

Fix original-subtitle dirty hash using object ToString instead of file name#12070

Merged
niksedk merged 1 commit into
mainfrom
fix/original-dirty-hash-filename
Jul 2, 2026
Merged

Fix original-subtitle dirty hash using object ToString instead of file name#12070
niksedk merged 1 commit into
mainfrom
fix/original-dirty-hash-filename

Conversation

@niksedk

@niksedk niksedk commented Jul 2, 2026

Copy link
Copy Markdown
Member

GetFastHashOriginal built its prefix with _subtitleOriginal + SelectedEncoding.DisplayName — string-concatenating the Subtitle object, whose default ToString() is constant — instead of _subtitleFileNameOriginal. So the original subtitle's file name never contributed to the change-detection hash, unlike GetFastHash, which correctly uses _subtitleFileName.

One-line fix: use _subtitleFileNameOriginal, mirroring GetFastHash.

Found while profiling the slow-timer hash passes in the performance review (#12069).

🤖 Generated with Claude Code

…e name

GetFastHashOriginal concatenated the _subtitleOriginal Subtitle object
(whose ToString is constant) instead of _subtitleFileNameOriginal, so
the original file name never contributed to the change-detection hash,
unlike GetFastHash which uses _subtitleFileName.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@niksedk niksedk merged commit b719698 into main Jul 2, 2026
1 of 3 checks passed
@niksedk niksedk deleted the fix/original-dirty-hash-filename branch July 2, 2026 12:01
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