This commit is contained in:
afkarxyz
2026-02-24 18:42:22 +07:00
parent 1314c14c59
commit 9ef24f5a91
26 changed files with 904 additions and 635 deletions
+6 -1
View File
@@ -31,6 +31,7 @@ export interface Settings {
createPlaylistFolder: boolean;
createM3u8File: boolean;
useFirstArtistOnly: boolean;
useSingleGenre: boolean;
}
export const FOLDER_PRESETS: Record<FolderPreset, {
label: string;
@@ -111,7 +112,8 @@ export const DEFAULT_SETTINGS: Settings = {
spotFetchAPIUrl: "https://spotify.afkarxyz.fun/api",
createPlaylistFolder: true,
createM3u8File: false,
useFirstArtistOnly: false
useFirstArtistOnly: false,
useSingleGenre: false
};
export const FONT_OPTIONS: {
value: FontFamily;
@@ -309,6 +311,9 @@ export async function loadSettings(): Promise<Settings> {
if (!('useFirstArtistOnly' in parsed)) {
parsed.useFirstArtistOnly = false;
}
if (!('useSingleGenre' in parsed)) {
parsed.useSingleGenre = false;
}
cachedSettings = { ...DEFAULT_SETTINGS, ...parsed };
return cachedSettings!;
}