mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-02 08:26:22 +01:00
web/settings: validate youtubeDubLang as literal
This commit is contained in:
parent
160160704d
commit
f4ca4ea719
1 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@ import {
|
||||||
youtubeVideoCodecOptions,
|
youtubeVideoCodecOptions,
|
||||||
type PartialSettings,
|
type PartialSettings,
|
||||||
} from '$lib/types/settings';
|
} from '$lib/types/settings';
|
||||||
|
import { youtubeLanguages } from './youtube-lang';
|
||||||
|
|
||||||
function validateTypes(input: unknown, reference = defaultSettings as unknown) {
|
function validateTypes(input: unknown, reference = defaultSettings as unknown) {
|
||||||
if (typeof input === 'undefined')
|
if (typeof input === 'undefined')
|
||||||
|
@ -79,7 +80,8 @@ export function validateSettings(settings: PartialSettings) {
|
||||||
[ settings?.save?.filenameStyle , filenameStyleOptions ],
|
[ settings?.save?.filenameStyle , filenameStyleOptions ],
|
||||||
[ settings?.save?.videoQuality , videoQualityOptions ],
|
[ settings?.save?.videoQuality , videoQualityOptions ],
|
||||||
[ settings?.save?.youtubeVideoCodec, youtubeVideoCodecOptions ],
|
[ settings?.save?.youtubeVideoCodec, youtubeVideoCodecOptions ],
|
||||||
[ settings?.save?.savingMethod , savingMethodOptions ]
|
[ settings?.save?.savingMethod , savingMethodOptions ],
|
||||||
|
[ settings?.save?.youtubeDubLang , youtubeLanguages ]
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue