mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-16 13:55:51 -07:00
feat(stats): add alass sidecar retiming for sentence mining and fix timi
- Retime local English sidecars against the Japanese sidecar via alass before populating sentence card translation fields; cache retimed copies for the process lifetime - Reject reversed or non-positive subtitle timings in immersion tracker and before media generation - Fix word card mining so sentence audio goes to SentenceAudio (not ExpressionAudio) and English subtitle text is not written to SelectionText - Consolidate 10 individual change fragments into stats-updates.md
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import type { SentenceSearchResult } from '../types/stats';
|
||||
import { getStatsMineCardUnavailableReason } from './mining';
|
||||
|
||||
export interface SentenceMatchRange {
|
||||
start: number;
|
||||
@@ -41,11 +42,7 @@ export function getSentenceSearchMineAvailability(
|
||||
query: string,
|
||||
): SentenceSearchMineAvailability {
|
||||
const exactMatch = findExactSentenceMatches(result.text, query).length > 0;
|
||||
const unavailableReason = !result.sourcePath
|
||||
? 'This source has no local file path.'
|
||||
: result.segmentStartMs == null || result.segmentEndMs == null
|
||||
? 'This line is missing segment timing.'
|
||||
: null;
|
||||
const unavailableReason = getStatsMineCardUnavailableReason(result);
|
||||
|
||||
return {
|
||||
canMineSentence: unavailableReason === null,
|
||||
|
||||
Reference in New Issue
Block a user