Fix AniList URL guard

This commit is contained in:
2026-02-16 01:56:21 -08:00
parent faf82fa3ed
commit 107971f151
14 changed files with 1010 additions and 18 deletions

View File

@@ -226,6 +226,10 @@ export const DEFAULT_CONFIG: ResolvedConfig = {
languagePreference: "ja",
maxEntryResults: 10,
},
anilist: {
enabled: false,
accessToken: "",
},
youtubeSubgen: {
mode: "automatic",
whisperBin: "",
@@ -467,6 +471,18 @@ export const CONFIG_OPTION_REGISTRY: ConfigOptionRegistryEntry[] = [
defaultValue: DEFAULT_CONFIG.jimaku.maxEntryResults,
description: "Maximum Jimaku search results returned.",
},
{
path: "anilist.enabled",
kind: "boolean",
defaultValue: DEFAULT_CONFIG.anilist.enabled,
description: "Enable AniList post-watch progress updates.",
},
{
path: "anilist.accessToken",
kind: "string",
defaultValue: DEFAULT_CONFIG.anilist.accessToken,
description: "AniList access token used for post-watch updates.",
},
{
path: "youtubeSubgen.mode",
kind: "enum",
@@ -600,6 +616,11 @@ export const CONFIG_TEMPLATE_SECTIONS: ConfigTemplateSection[] = [
],
key: "youtubeSubgen",
},
{
title: "Anilist",
description: ["Anilist API credentials and update behavior."],
key: "anilist",
},
];
export function deepCloneConfig(config: ResolvedConfig): ResolvedConfig {