mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
web/settings: add youtubeVideoContainer & subtitleLang
& bump schema to v6
This commit is contained in:
parent
3daf1c4834
commit
6e394cda29
@ -3,7 +3,7 @@ import { defaultLocale } from "$lib/i18n/translations";
|
||||
import type { CobaltSettings } from "$lib/types/settings";
|
||||
|
||||
const defaultSettings: CobaltSettings = {
|
||||
schemaVersion: 5,
|
||||
schemaVersion: 6,
|
||||
advanced: {
|
||||
debug: false,
|
||||
useWebCodecs: false,
|
||||
@ -33,7 +33,9 @@ const defaultSettings: CobaltSettings = {
|
||||
tiktokFullAudio: false,
|
||||
convertGif: true,
|
||||
videoQuality: "1080",
|
||||
subtitleLang: "none",
|
||||
youtubeVideoCodec: "h264",
|
||||
youtubeVideoContainer: "auto",
|
||||
youtubeDubLang: "original",
|
||||
youtubeHLS: false,
|
||||
youtubeBetterAudio: false,
|
||||
|
@ -3,15 +3,17 @@ import type { CobaltSettingsV2 } from "$lib/types/settings/v2";
|
||||
import type { CobaltSettingsV3 } from "$lib/types/settings/v3";
|
||||
import type { CobaltSettingsV4 } from "$lib/types/settings/v4";
|
||||
import type { CobaltSettingsV5 } from "$lib/types/settings/v5";
|
||||
import type { CobaltSettingsV6 } from "$lib/types/settings/v6";
|
||||
|
||||
export * from "$lib/types/settings/v2";
|
||||
export * from "$lib/types/settings/v3";
|
||||
export * from "$lib/types/settings/v4";
|
||||
export * from "$lib/types/settings/v5";
|
||||
export * from "$lib/types/settings/v6";
|
||||
|
||||
export type CobaltSettings = CobaltSettingsV5;
|
||||
export type CobaltSettings = CobaltSettingsV6;
|
||||
|
||||
export type AnyCobaltSettings = CobaltSettingsV4 | CobaltSettingsV3 | CobaltSettingsV2 | CobaltSettings;
|
||||
export type AnyCobaltSettings = CobaltSettingsV5 | CobaltSettingsV4 | CobaltSettingsV3 | CobaltSettingsV2 | CobaltSettings;
|
||||
|
||||
export type PartialSettings = RecursivePartial<CobaltSettings>;
|
||||
|
||||
|
12
web/src/lib/types/settings/v6.ts
Normal file
12
web/src/lib/types/settings/v6.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import type { SubtitleLang } from "$lib/settings/audio-sub-language";
|
||||
import type { CobaltSettingsV5 } from "$lib/types/settings/v5";
|
||||
|
||||
export const youtubeVideoContainerOptions = ["auto", "mp4", "webm", "mkv"] as const;
|
||||
|
||||
export type CobaltSettingsV6 = Omit<CobaltSettingsV5, 'schemaVersion' | 'save'> & {
|
||||
schemaVersion: 6,
|
||||
save: CobaltSettingsV5['save'] & {
|
||||
youtubeVideoContainer: typeof youtubeVideoContainerOptions[number];
|
||||
subtitleLang: SubtitleLang,
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue
Block a user