From 467808a6a75b57dfcdc8653d6ccc649244b6bead Mon Sep 17 00:00:00 2001 From: dkanada Date: Tue, 5 Mar 2019 21:38:14 +0900 Subject: [PATCH] include new setting in form load and submit --- src/dashboard/dashboardgeneral.js | 4 ++++ src/dashboard/librarysettings.js | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dashboard/dashboardgeneral.js b/src/dashboard/dashboardgeneral.js index 035e275927..3f140e2c6c 100644 --- a/src/dashboard/dashboardgeneral.js +++ b/src/dashboard/dashboardgeneral.js @@ -4,6 +4,8 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb function loadPage(page, config, languageOptions, systemInfo) { systemInfo.CanLaunchWebBrowser ? page.querySelector("#fldRunWebAppAtStartup").classList.remove("hide") : page.querySelector("#fldRunWebAppAtStartup").classList.add("hide"); page.querySelector("#txtCachePath").value = config.CachePath || ""; + $("#txtMetadataPath", page).val(config.MetadataPath || ""); + $("#txtMetadataNetworkPath", page).val(config.MetadataNetworkPath || ""); $("#selectLocalizationLanguage", page).html(languageOptions.map(function(l) { return '" })).val(config.UICulture); @@ -23,6 +25,8 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb return ApiClient.getServerConfiguration().then(function(config) { config.UICulture = $("#selectLocalizationLanguage", form).val(); config.CachePath = form.querySelector("#txtCachePath").value; + config.MetadataPath = $("#txtMetadataPath", form).val(); + config.MetadataNetworkPath = $("#txtMetadataNetworkPath", form).val(); var requiresReload = false; if (config.UICulture !== currentLanguage) { requiresReload = true; diff --git a/src/dashboard/librarysettings.js b/src/dashboard/librarysettings.js index 8f90edd38d..7d0052f3ca 100644 --- a/src/dashboard/librarysettings.js +++ b/src/dashboard/librarysettings.js @@ -4,8 +4,6 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked", "emby-checkbox", "emby- function loadPage(page, config) { config.MergeMetadataAndImagesByName ? $(".fldImagesByName", page).hide() : $(".fldImagesByName", page).show(); $("#chkSaveMetadataHidden", page).checked(config.SaveMetadataHidden); - $("#txtMetadataPath", page).val(config.MetadataPath || ""); - $("#txtMetadataNetworkPath", page).val(config.MetadataNetworkPath || ""); loading.hide(); } @@ -54,8 +52,6 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked", "emby-checkbox", "emby- config.EnableTvDbUpdates = $("#chkEnableTvdbUpdates", form).checked(); config.EnableTmdbUpdates = $("#chkEnableTmdbUpdates", form).checked(); config.EnableFanArtUpdates = $("#chkEnableFanartUpdates", form).checked(); - config.MetadataPath = $("#txtMetadataPath", form).val(); - config.MetadataNetworkPath = $("#txtMetadataNetworkPath", form).val(); config.FanartApiKey = $("#txtFanartApiKey", form).val(); ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult, onSubmitFail); });