Repository navigation
Conversation
silentbil
left a comment
There was a problem hiding this comment.
Thanks for putting this together! I went through the changes to the AutoSync / subtitle matching flow, and I'd prefer not to proceed with this PR, because of the risk to a feature that's working well right now. A few specifics:
1. Secondary-language fallback can leave the scan stuck.
The fallback calls findBestSubtitleMatch(scanLang = secondaryLang) from inside the running scan. At that point the scan hasn't ended yet: isFindingBestMatch is still true until selectLastResort() / endMatch() run. So the nested call returns immediately on its guard. Then return@launch skips the audio-sync fallback and the last-resort pick, and "Adjusting subtitles…" stays on screen for the rest of that playback, blocking further scans. This would hit anyone with a secondary language set whenever the primary language isn't verified.
2. Secondary-language references in audio sync.
englishCandidates() feeds the references that the recognised speech is matched against, and that matching is text-based on English. Subtitles in another language can't match the recognised words, and they compete for the same few slots (PREFETCH_REFERENCES = 2, MAX_REFERENCES = 4), so they can push out the English references that actually make the sync work.
3. "Preserve User Subtitle Selection".
I couldn't find any change for this in the diff. It's also already handled on main: a manual pick sets hasManualSubtitleSelection / userPickedSubtitle, and both auto-selection and audio sync back off when they're set.
Thanks again for the effort and interest in this part of the app!
Summary
Enhances the subtitle AutoSync engine with modern glass HUD notifications, secondary language fallback, and sticky user subtitle selection.
Key Changes
Glass Bubble Notifications (הודעות בועת זכוכית):
Secondary Preferred Subtitle Language Fallback:
Preserve User Subtitle Selection: