mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-22 02:56:24 -07:00
fix: harden AI subtitle fix response parsing
This commit is contained in:
@@ -27,6 +27,20 @@ export interface OverlayShortcutLifecycleDeps {
|
||||
cancelPendingMineSentenceMultiple: () => void;
|
||||
}
|
||||
|
||||
export function shouldActivateOverlayShortcuts(args: {
|
||||
overlayRuntimeInitialized: boolean;
|
||||
isMacOSPlatform: boolean;
|
||||
trackedMpvWindowFocused: boolean;
|
||||
}): boolean {
|
||||
if (!args.overlayRuntimeInitialized) {
|
||||
return false;
|
||||
}
|
||||
if (!args.isMacOSPlatform) {
|
||||
return true;
|
||||
}
|
||||
return args.trackedMpvWindowFocused;
|
||||
}
|
||||
|
||||
export function registerOverlayShortcuts(
|
||||
shortcuts: ConfiguredShortcuts,
|
||||
handlers: OverlayShortcutHandlers,
|
||||
|
||||
Reference in New Issue
Block a user