mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-07 03:22:17 -08:00
feat(subsync): add replace option and deterministic retimed naming
This commit is contained in:
@@ -50,6 +50,7 @@ export const CORE_DEFAULT_CONFIG: Pick<
|
||||
alass_path: '',
|
||||
ffsubsync_path: '',
|
||||
ffmpeg_path: '',
|
||||
replace: true,
|
||||
},
|
||||
startupWarmups: {
|
||||
lowPowerMode: false,
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user