mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-23 04:46:08 -08:00
refactor(ipc): remove dead preload methods and the ASS line broadcast (#293)
Drop 16 overlay preload methods with no caller (onSubtitleAss, getCurrentSubtitleAss, onVisibility, getOverlayVisibility, openYomitanSettings, quitApp, toggleOverlay, getMecabStatus, setMecabEnabled, getKeybindings, saveControllerPreference, getAnkiConnectStatus, setAnkiConnectEnabled, clearAnkiConnectHistory, cycleRuntimeOption, appendClipboardVideoToQueue) along with their IPC_CHANNELS keys, handlers, validators and dep plumbing. With both ASS consumers gone, stop observing sub-text/ass in mpv and remove the subtitle-ass-change event chain and appState.currentSubAssText. The main-process functions these wrapped stay; tray, CLI, shortcuts and session actions still use them.
This commit is contained in:
1 parent
8fc20b2499
commit
7909fcd2cf
32 files changed
+8
-876
No files matched your search
@@ -10,7 +10,6 @@ import {
|
||||
createHandleMpvPauseChangeHandler,
|
||||
createHandleMpvSecondarySubtitleChangeHandler,
|
||||
createHandleMpvSecondarySubtitleVisibilityHandler,
|
||||
createHandleMpvSubtitleAssChangeHandler,
|
||||
createHandleMpvSubtitleChangeHandler,
|
||||
createHandleMpvSubtitleMetricsChangeHandler,
|
||||
createHandleMpvTimePosChangeHandler,
|
||||
@@ -52,8 +51,6 @@ export function createBindMpvMainEventHandlersHandler(deps: {
|
||||
logSubtitleProcessingDebug?: (message: string) => void;
|
||||
refreshDiscordPresence: () => void;
|
||||
|
||||
setCurrentSubAssText: (text: string) => void;
|
||||
broadcastSubtitleAss: (text: string) => void;
|
||||
broadcastSecondarySubtitle: (text: string) => void;
|
||||
onSubtitleTrackChange?: (sid: number | null) => void;
|
||||
onSecondarySubtitleTrackChange?: (sid: number | null) => void;
|
||||
@@ -135,10 +132,6 @@ export function createBindMpvMainEventHandlersHandler(deps: {
|
||||
: undefined,
|
||||
refreshDiscordPresence: () => deps.refreshDiscordPresence(),
|
||||
});
|
||||
const handleMpvSubtitleAssChange = createHandleMpvSubtitleAssChangeHandler({
|
||||
setCurrentSubAssText: (text) => deps.setCurrentSubAssText(text),
|
||||
broadcastSubtitleAss: (text) => deps.broadcastSubtitleAss(text),
|
||||
});
|
||||
const handleMpvSecondarySubtitleChange = createHandleMpvSecondarySubtitleChangeHandler({
|
||||
broadcastSecondarySubtitle: (text) => deps.broadcastSecondarySubtitle(text),
|
||||
});
|
||||
@@ -200,7 +193,6 @@ export function createBindMpvMainEventHandlersHandler(deps: {
|
||||
createBindMpvClientEventHandlers({
|
||||
onConnectionChange: handleMpvConnectionChangeWithSidebarReset,
|
||||
onSubtitleChange: handleMpvSubtitleChange,
|
||||
onSubtitleAssChange: handleMpvSubtitleAssChange,
|
||||
onSecondarySubtitleChange: handleMpvSecondarySubtitleChange,
|
||||
onSubtitleTrackChange: ({ sid }) => deps.onSubtitleTrackChange?.(sid),
|
||||
onSecondarySubtitleTrackChange: ({ sid }) => deps.onSecondarySubtitleTrackChange?.(sid),
|
||||
|
||||
Reference in new issue
Block a user