feat(subsync): add replace option and deterministic retimed naming

This commit is contained in:
2026-03-03 00:26:31 -08:00
parent 6c80bd5843
commit 10ef535f9a
11 changed files with 171 additions and 7 deletions

View File

@@ -50,6 +50,7 @@ export const CORE_DEFAULT_CONFIG: Pick<
alass_path: '',
ffsubsync_path: '',
ffmpeg_path: '',
replace: true,
},
startupWarmups: {
lowPowerMode: false,

View File

@@ -32,6 +32,12 @@ export function buildCoreConfigOptionRegistry(
defaultValue: defaultConfig.subsync.defaultMode,
description: 'Subsync default mode.',
},
{
path: 'subsync.replace',
kind: 'boolean',
defaultValue: defaultConfig.subsync.replace,
description: 'Replace the active subtitle file when sync completes.',
},
{
path: 'startupWarmups.lowPowerMode',
kind: 'boolean',

View File

@@ -173,6 +173,12 @@ export function applyCoreDomainConfig(context: ResolveContext): void {
if (ffsubsync !== undefined) resolved.subsync.ffsubsync_path = ffsubsync;
const ffmpeg = asString(src.subsync.ffmpeg_path);
if (ffmpeg !== undefined) resolved.subsync.ffmpeg_path = ffmpeg;
const replace = asBoolean(src.subsync.replace);
if (replace !== undefined) {
resolved.subsync.replace = replace;
} else if (src.subsync.replace !== undefined) {
warn('subsync.replace', src.subsync.replace, resolved.subsync.replace, 'Expected boolean.');
}
}
if (isObject(src.subtitlePosition)) {