From 9ab45c43ad9ce6207302c9995dfed578cbcf109b Mon Sep 17 00:00:00 2001 From: Topher Johnson Date: Sun, 25 Feb 2024 13:35:36 -0800 Subject: [PATCH] Change LibraryOption to match backend Changed "disable" to "enable" to match backend. It makes more sense to have it be "enable" because that's what the checkbox says. Now no weird "not" logic is needed to send options to the backend. --- src/components/libraryoptionseditor/libraryoptionseditor.js | 4 ++-- .../libraryoptionseditor/libraryoptionseditor.template.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index c8f1a1ddcf..036dbf948b 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -511,7 +511,7 @@ function setImageOptionsIntoOptions(options) { export function getLibraryOptions(parent) { const options = { - Disabled: !parent.querySelector('.chkEnabled').checked, + Enabled: parent.querySelector('.chkEnabled').checked, EnableArchiveMediaFiles: false, EnablePhotos: parent.querySelector('.chkEnablePhotos').checked, EnableRealtimeMonitor: parent.querySelector('.chkEnableRealtimeMonitor').checked, @@ -575,7 +575,7 @@ export function setLibraryOptions(parent, options) { parent.querySelector('#selectCountry').value = options.MetadataCountryCode || ''; parent.querySelector('#selectAutoRefreshInterval').value = options.AutomaticRefreshIntervalDays || '0'; parent.querySelector('#txtSeasonZeroName').value = options.SeasonZeroDisplayName || 'Specials'; - parent.querySelector('.chkEnabled').checked = !options.Disabled; + parent.querySelector('.chkEnabled').checked = options.Enabled; parent.querySelector('.chkEnablePhotos').checked = options.EnablePhotos; parent.querySelector('.chkEnableRealtimeMonitor').checked = options.EnableRealtimeMonitor; parent.querySelector('.chkEnableLUFSScan').checked = options.EnableLUFSScan; diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.template.html b/src/components/libraryoptionseditor/libraryoptionseditor.template.html index ea0f3069f7..38ebe99310 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.template.html +++ b/src/components/libraryoptionseditor/libraryoptionseditor.template.html @@ -1,5 +1,5 @@

${HeaderLibrarySettings}

-
+