fix(startup): signal autoplay gate from subtitle resolve; dedupe dict sy

- Add onResolvedSubtitle callback to resolveCurrentSubtitleForRenderer so the startup overlay-ready gate fires after the initial subtitle resolves
- Guard scheduleCharacterDictionarySync behind a last-path check so duplicate MPV media-path events don't re-trigger sync for the same video
This commit is contained in:
2026-06-05 22:04:20 -07:00
parent f675ef5b02
commit 1fe9bdc198
7 changed files with 73 additions and 7 deletions
+4
View File
@@ -6863,6 +6863,10 @@ const { registerIpcRuntimeHandlers } = composeIpcRuntimeHandlers({
tokenizeSubtitle: tokenizeSubtitleForCurrent
? (text) => tokenizeSubtitleForCurrent(text)
: undefined,
onResolvedSubtitle: (payload) => {
appState.currentSubtitleData = payload;
autoplayReadyGate.maybeSignalPluginAutoplayReady(payload, { forceWhilePaused: true });
},
});
},
getCurrentSubtitleRaw: () => appState.currentSubText,