mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-27 12:55:20 -07:00
Fix Windows mpv logging and add log export (#88)
This commit is contained in:
@@ -28,7 +28,13 @@ export const CORE_DEFAULT_CONFIG: Pick<
|
||||
port: 6678,
|
||||
},
|
||||
logging: {
|
||||
level: 'info',
|
||||
level: 'warn',
|
||||
rotation: 7,
|
||||
files: {
|
||||
app: true,
|
||||
launcher: true,
|
||||
mpv: false,
|
||||
},
|
||||
},
|
||||
texthooker: {
|
||||
launchAtStartup: false,
|
||||
|
||||
@@ -110,7 +110,6 @@ export const INTEGRATIONS_DEFAULT_CONFIG: Pick<
|
||||
enabled: false,
|
||||
accessToken: '',
|
||||
characterDictionary: {
|
||||
enabled: false,
|
||||
refreshTtlHours: 168,
|
||||
maxLoaded: 3,
|
||||
evictionPolicy: 'delete',
|
||||
|
||||
@@ -92,6 +92,7 @@ test('config option registry includes critical paths and has unique entries', ()
|
||||
|
||||
for (const requiredPath of [
|
||||
'logging.level',
|
||||
'logging.files.mpv',
|
||||
'annotationWebsocket.enabled',
|
||||
'controller.enabled',
|
||||
'controller.scrollPixelsPerSecond',
|
||||
@@ -101,7 +102,7 @@ test('config option registry includes critical paths and has unique entries', ()
|
||||
'subtitleStyle.enableJlpt',
|
||||
'subtitleStyle.autoPauseVideoOnYomitanPopup',
|
||||
'ankiConnect.enabled',
|
||||
'anilist.characterDictionary.enabled',
|
||||
'subtitleStyle.nameMatchEnabled',
|
||||
'anilist.characterDictionary.collapsibleSections.description',
|
||||
'mpv.executablePath',
|
||||
'mpv.launchMode',
|
||||
|
||||
@@ -83,6 +83,30 @@ export function buildCoreConfigOptionRegistry(
|
||||
defaultValue: defaultConfig.logging.level,
|
||||
description: 'Minimum log level for runtime logging.',
|
||||
},
|
||||
{
|
||||
path: 'logging.rotation',
|
||||
kind: 'number',
|
||||
defaultValue: defaultConfig.logging.rotation,
|
||||
description: 'Number of days of app, launcher, and mpv logs to retain.',
|
||||
},
|
||||
{
|
||||
path: 'logging.files.app',
|
||||
kind: 'boolean',
|
||||
defaultValue: defaultConfig.logging.files.app,
|
||||
description: 'Write SubMiner app runtime logs.',
|
||||
},
|
||||
{
|
||||
path: 'logging.files.launcher',
|
||||
kind: 'boolean',
|
||||
defaultValue: defaultConfig.logging.files.launcher,
|
||||
description: 'Write launcher command logs.',
|
||||
},
|
||||
{
|
||||
path: 'logging.files.mpv',
|
||||
kind: 'boolean',
|
||||
defaultValue: defaultConfig.logging.files.mpv,
|
||||
description: 'Write mpv player logs. Enable temporarily when debugging mpv/plugin startup.',
|
||||
},
|
||||
{
|
||||
path: 'youtube.primarySubLanguages',
|
||||
kind: 'string',
|
||||
|
||||
@@ -392,13 +392,6 @@ export function buildIntegrationConfigOptionRegistry(
|
||||
description:
|
||||
'Optional explicit AniList access token override; leave empty to use locally stored token from setup.',
|
||||
},
|
||||
{
|
||||
path: 'anilist.characterDictionary.enabled',
|
||||
kind: 'boolean',
|
||||
defaultValue: defaultConfig.anilist.characterDictionary.enabled,
|
||||
description:
|
||||
'Enable automatic Yomitan character dictionary sync for currently watched AniList media.',
|
||||
},
|
||||
{
|
||||
path: 'anilist.characterDictionary.refreshTtlHours',
|
||||
kind: 'number',
|
||||
@@ -426,7 +419,7 @@ export function buildIntegrationConfigOptionRegistry(
|
||||
kind: 'enum',
|
||||
enumValues: ['all', 'active'],
|
||||
defaultValue: defaultConfig.anilist.characterDictionary.profileScope,
|
||||
description: 'Yomitan profile scope for dictionary enable/disable updates.',
|
||||
description: 'Yomitan profile scope for character dictionary settings updates.',
|
||||
},
|
||||
{
|
||||
path: 'anilist.characterDictionary.collapsibleSections.description',
|
||||
|
||||
@@ -74,7 +74,7 @@ export function buildSubtitleConfigOptionRegistry(
|
||||
kind: 'boolean',
|
||||
defaultValue: defaultConfig.subtitleStyle.nameMatchEnabled,
|
||||
description:
|
||||
'Enable subtitle token coloring for matches from the SubMiner character dictionary.',
|
||||
'Enable character dictionary sync and subtitle token coloring for character-name matches.',
|
||||
},
|
||||
{
|
||||
path: 'subtitleStyle.nameMatchImagesEnabled',
|
||||
|
||||
@@ -33,7 +33,7 @@ const CORE_TEMPLATE_SECTIONS: ConfigTemplateSection[] = [
|
||||
{
|
||||
title: 'Logging',
|
||||
description: ['Controls logging verbosity.', 'Set to debug for full runtime diagnostics.'],
|
||||
notes: ['Hot-reload: logging.level applies live while SubMiner is running.'],
|
||||
notes: ['Hot-reload: logging.level and logging.files apply live while SubMiner is running.'],
|
||||
key: 'logging',
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user