mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-27 18:12:05 -07:00
refactor: move youtube primary subtitle config to youtube
This commit is contained in:
@@ -11,6 +11,7 @@ export const CORE_DEFAULT_CONFIG: Pick<
|
||||
| 'controller'
|
||||
| 'shortcuts'
|
||||
| 'secondarySub'
|
||||
| 'youtube'
|
||||
| 'subsync'
|
||||
| 'startupWarmups'
|
||||
| 'auto_start_overlay'
|
||||
@@ -93,6 +94,9 @@ export const CORE_DEFAULT_CONFIG: Pick<
|
||||
autoLoadSecondarySub: false,
|
||||
defaultMode: 'hover',
|
||||
},
|
||||
youtube: {
|
||||
primarySubLanguages: ['ja', 'jpn'],
|
||||
},
|
||||
subsync: {
|
||||
defaultMode: 'auto',
|
||||
alass_path: '',
|
||||
|
||||
@@ -152,6 +152,5 @@ export const INTEGRATIONS_DEFAULT_CONFIG: Pick<
|
||||
model: '',
|
||||
systemPrompt: '',
|
||||
},
|
||||
primarySubLanguages: ['ja', 'jpn'],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -22,6 +22,7 @@ test('config option registry includes critical paths and has unique entries', ()
|
||||
'controller.enabled',
|
||||
'controller.scrollPixelsPerSecond',
|
||||
'startupWarmups.lowPowerMode',
|
||||
'youtube.primarySubLanguages',
|
||||
'subtitleStyle.enableJlpt',
|
||||
'subtitleStyle.autoPauseVideoOnYomitanPopup',
|
||||
'ankiConnect.enabled',
|
||||
@@ -43,6 +44,7 @@ test('config template sections include expected domains and unique keys', () =>
|
||||
'annotationWebsocket',
|
||||
'controller',
|
||||
'startupWarmups',
|
||||
'youtube',
|
||||
'subtitleStyle',
|
||||
'ankiConnect',
|
||||
'yomitan',
|
||||
|
||||
@@ -83,6 +83,12 @@ export function buildCoreConfigOptionRegistry(
|
||||
defaultValue: defaultConfig.logging.level,
|
||||
description: 'Minimum log level for runtime logging.',
|
||||
},
|
||||
{
|
||||
path: 'youtube.primarySubLanguages',
|
||||
kind: 'string',
|
||||
defaultValue: defaultConfig.youtube.primarySubLanguages.join(','),
|
||||
description: 'Comma-separated primary subtitle language priority for YouTube auto-loading.',
|
||||
},
|
||||
{
|
||||
path: 'controller.enabled',
|
||||
kind: 'boolean',
|
||||
|
||||
@@ -411,11 +411,5 @@ export function buildIntegrationConfigOptionRegistry(
|
||||
description:
|
||||
'Optional system prompt override for legacy subtitle fallback post-processing; not used by default.',
|
||||
},
|
||||
{
|
||||
path: 'youtubeSubgen.primarySubLanguages',
|
||||
kind: 'string',
|
||||
defaultValue: defaultConfig.youtubeSubgen.primarySubLanguages.join(','),
|
||||
description: 'Comma-separated primary subtitle language priority used by the launcher.',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ const INTEGRATION_TEMPLATE_SECTIONS: ConfigTemplateSection[] = [
|
||||
{
|
||||
title: 'YouTube Playback Settings',
|
||||
description: ['Defaults for SubMiner YouTube subtitle loading and languages.'],
|
||||
key: 'youtubeSubgen',
|
||||
key: 'youtube',
|
||||
},
|
||||
{
|
||||
title: 'Anilist',
|
||||
|
||||
Reference in New Issue
Block a user