From c3ac1bb49c87503c2dc5632004afd8a8c49ff520 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Wed, 24 Nov 2021 00:19:03 -0800 Subject: [PATCH] Add default serverType setting --- src/components/shared/setDefaultSettings.ts | 4 ++++ src/shared/mockSettings.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/src/components/shared/setDefaultSettings.ts b/src/components/shared/setDefaultSettings.ts index 063ab71..2ec96fa 100644 --- a/src/components/shared/setDefaultSettings.ts +++ b/src/components/shared/setDefaultSettings.ts @@ -2,6 +2,10 @@ import settings from 'electron-settings'; import path from 'path'; const setDefaultSettings = (force: boolean) => { + if (force || !settings.hasSync('serverType')) { + settings.setSync('serverType', 'subsonic'); + } + if (force || !settings.hasSync('legacyAuth')) { settings.setSync('legacyAuth', false); } diff --git a/src/shared/mockSettings.ts b/src/shared/mockSettings.ts index ede200e..5008016 100644 --- a/src/shared/mockSettings.ts +++ b/src/shared/mockSettings.ts @@ -1,4 +1,5 @@ export const mockSettings = { + serverType: 'subsonic', theme: 'defaultDark', showDebugWindow: false, globalMediaHotkeys: true,