(self.webpackChunk=self.webpackChunk||[]).push([[437],{35927:function(e,t,a){"use strict";a.r(t),a(5769),a(61013),a(63238),a(61418),a(17460),a(14078),a(71848);var n=a(6594),r=a(17025),o=a(53754),i=a(76543),l=a(61642);function s(){n.ZP.show();var e=this;return ApiClient.getNamedConfiguration(c).then((function(t){t.UserId=$("#selectUser",e).val()||null,t.ReleaseDateFormat=$("#selectReleaseDateFormat",e).val(),t.SaveImagePathsInNfo=e.querySelector("#chkSaveImagePaths").checked,t.EnablePathSubstitution=e.querySelector("#chkEnablePathSubstitution").checked,t.EnableExtraThumbsDuplication=e.querySelector("#chkEnableExtraThumbs").checked,ApiClient.updateNamedConfiguration(c,t).then((function(){var e;i.ZP.processServerConfigurationUpdateResult(),(e=[]).push(o.ZP.translate("MetadataSettingChangeHelp")),(0,l.Z)({text:e.join("<br/><br/>")})}))})),!1}function u(){return[{href:"#!/library.html",name:o.ZP.translate("HeaderLibraries")},{href:"#!/librarydisplay.html",name:o.ZP.translate("Display")},{href:"#!/metadataimages.html",name:o.ZP.translate("Metadata")},{href:"#!/metadatanfo.html",name:o.ZP.translate("TabNfoSettings")}]}var c="xbmcmetadata";$(document).on("pageinit","#metadataNfoPage",(function(){$(".metadataNfoForm").off("submit",s).on("submit",s)})).on("pageshow","#metadataNfoPage",(function(){r.Z.setTabs("metadata",3,u),n.ZP.show();var e=this,t=ApiClient.getUsers(),a=ApiClient.getNamedConfiguration(c);Promise.all([t,a]).then((function(t){!function(e,t,a){var r='<option value="" selected="selected">'+o.ZP.translate("None")+"</option>";r+=a.map((function(e){return'<option value="'+e.Id+'">'+e.Name+"</option>"})).join(""),$("#selectUser",e).html(r).val(t.UserId||""),$("#selectReleaseDateFormat",e).val(t.ReleaseDateFormat),e.querySelector("#chkSaveImagePaths").checked=t.SaveImagePathsInNfo,e.querySelector("#chkEnablePathSubstitution").checked=t.EnablePathSubstitution,e.querySelector("#chkEnableExtraThumbs").checked=t.EnableExtraThumbsDuplication,n.ZP.hide()}(e,t[1],t[0])}))}))}}]);