feat: add auto update support

This commit is contained in:
2026-05-15 01:47:56 -07:00
parent d1ec678d7a
commit 094bcce0dc
101 changed files with 4978 additions and 163 deletions
+7
View File
@@ -14,6 +14,7 @@ export const CORE_DEFAULT_CONFIG: Pick<
| 'youtube'
| 'subsync'
| 'startupWarmups'
| 'updates'
| 'auto_start_overlay'
> = {
subtitlePosition: { yPercent: 10 },
@@ -116,5 +117,11 @@ export const CORE_DEFAULT_CONFIG: Pick<
subtitleDictionaries: true,
jellyfinRemoteSession: true,
},
updates: {
enabled: true,
checkIntervalHours: 24,
notificationType: 'system',
channel: 'stable',
},
auto_start_overlay: false,
};
@@ -22,6 +22,7 @@ test('config option registry includes critical paths and has unique entries', ()
'controller.enabled',
'controller.scrollPixelsPerSecond',
'startupWarmups.lowPowerMode',
'updates.channel',
'youtube.primarySubLanguages',
'subtitleStyle.enableJlpt',
'subtitleStyle.autoPauseVideoOnYomitanPopup',
+26
View File
@@ -383,6 +383,32 @@ export function buildCoreConfigOptionRegistry(
defaultValue: defaultConfig.startupWarmups.jellyfinRemoteSession,
description: 'Warm up Jellyfin remote session at startup.',
},
{
path: 'updates.enabled',
kind: 'boolean',
defaultValue: defaultConfig.updates.enabled,
description: 'Run automatic update checks in the background.',
},
{
path: 'updates.checkIntervalHours',
kind: 'number',
defaultValue: defaultConfig.updates.checkIntervalHours,
description: 'Minimum hours between automatic update checks.',
},
{
path: 'updates.notificationType',
kind: 'enum',
enumValues: ['system', 'osd', 'both', 'none'],
defaultValue: defaultConfig.updates.notificationType,
description: 'How SubMiner announces available updates.',
},
{
path: 'updates.channel',
kind: 'enum',
enumValues: ['stable', 'prerelease'],
defaultValue: defaultConfig.updates.channel,
description: 'Release channel used for update checks.',
},
{
path: 'shortcuts.multiCopyTimeoutMs',
kind: 'number',
@@ -53,6 +53,14 @@ const CORE_TEMPLATE_SECTIONS: ConfigTemplateSection[] = [
],
key: 'startupWarmups',
},
{
title: 'Updates',
description: [
'Automatic update check behavior.',
'Manual checks from the tray or launcher are always allowed.',
],
key: 'updates',
},
{
title: 'Keyboard Shortcuts',
description: ['Overlay keyboard shortcuts. Set a shortcut to null to disable.'],