mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
include new setting in form load and submit
This commit is contained in:
parent
141ff8887f
commit
467808a6a7
@ -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 '<option value="' + l.Value + '">' + l.Name + "</option>"
|
||||
})).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;
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user