fix: suppress overlay subtitle immediately when character dictionary modal opens (#84)

This commit is contained in:
2026-05-25 02:30:33 -07:00
committed by GitHub
parent 9fe13601fb
commit 7e6f9672cf
15 changed files with 307 additions and 49 deletions
+3 -2
View File
@@ -51,15 +51,16 @@ export function showMpvOsdRuntime(
mpvClient: MpvRuntimeClientLike | null,
text: string,
fallbackLog: (text: string) => void = (line) => logger.info(line),
): void {
): boolean {
if (mpvClient && mpvClient.connected) {
const command = text.includes('${')
? ['expand-properties', 'show-text', text, '3000']
: ['show-text', text, '3000'];
mpvClient.send({ command });
return;
return true;
}
fallbackLog(`OSD (MPV not connected): ${text}`);
return false;
}
export function replayCurrentSubtitleRuntime(mpvClient: MpvRuntimeClientLike | null): void {