mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-27 11:35:23 -07:00
fix(subtitles): follow sub-delay in sidebar, navigation, and overlay matching
Anything comparing time-pos with parsed cues now converts through a shared subtitle-clock helper: the sidebar highlight and click-to-seek, the sub-seek cue sanitizer, overlay/primer line resolution, and the replay pause point after sub-seek.
This commit is contained in:
20 files changed
+177
-41
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { toSubtitleClock } from '../../core/services/subtitle-clock';
|
||||
import { createSubtitleLineDedupGate } from '../../core/services/subtitle-line-dedup-gate';
|
||||
import type { MergedToken, SubtitleCue, SubtitleData } from '../../types';
|
||||
import {
|
||||
@@ -162,7 +163,10 @@ export function createBuildBindMpvMainEventHandlersMainDepsHandler(deps: {
|
||||
resolveSubtitleText: (liveText: string) =>
|
||||
resolvePrimarySubtitleText({
|
||||
liveText,
|
||||
currentTimeSec: Number(deps.appState.mpvClient?.currentTimePos),
|
||||
currentTimeSec: toSubtitleClock(
|
||||
Number(deps.appState.mpvClient?.currentTimePos),
|
||||
deps.appState.mpvClient?.currentSubDelay ?? 0,
|
||||
),
|
||||
cues: deps.appState.activeParsedSubtitleCues,
|
||||
}),
|
||||
getCurrentLiveSubtitleText: () => deps.appState.mpvClient?.currentSubText ?? '',
|
||||
|
||||
Reference in new issue
Block a user