api/schema: transform localProcessing to enum

This commit is contained in:
wukko 2025-06-22 16:20:27 +06:00
parent a998a5720c
commit a6b599a828
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -34,6 +34,10 @@ export const apiSchema = z.object({
["max", "4320", "2160", "1440", "1080", "720", "480", "360", "240", "144"]
).default("1080"),
localProcessing: z.enum(
["disabled", "preferred", "forced"]
).default("disabled"),
youtubeDubLang: z.string()
.min(2)
.max(8)
@ -53,12 +57,11 @@ export const apiSchema = z.object({
tiktokFullAudio: z.boolean().default(false),
alwaysProxy: z.boolean().default(false),
localProcessing: z.boolean().default(false),
youtubeHLS: z.boolean().default(false),
youtubeBetterAudio: z.boolean().default(false),
// temporarily kept for backwards compatibility with cobalt 10 schema
// TODO: remove after backwards compatibility period
twitterGif: z.boolean().default(false),
tiktokH265: z.boolean().default(false),
})