feat: default sub/audio setting

This commit is contained in:
Fredrik Burmester
2024-09-03 08:54:48 +03:00
parent 10e0a45cd4
commit 2509a8d6e2
5 changed files with 452 additions and 318 deletions

View File

@@ -32,6 +32,11 @@ export type LibraryOptions = {
showStats: boolean;
};
export type DefaultLanguageOption = {
value: string;
label: string;
};
type Settings = {
autoRotate?: boolean;
forceLandscapeInVideoPlayer?: boolean;
@@ -45,6 +50,8 @@ type Settings = {
openInVLC?: boolean;
downloadQuality?: DownloadOption;
libraryOptions: LibraryOptions;
defaultSubtitleLanguage: DefaultLanguageOption | null;
defaultAudioLanguage: DefaultLanguageOption | null;
};
/**
@@ -75,6 +82,8 @@ const loadSettings = async (): Promise<Settings> => {
showTitles: true,
showStats: true,
},
defaultAudioLanguage: null,
defaultSubtitleLanguage: null,
};
try {