"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[437],{35927:function(e,t,a){a.r(t),a(61013),a(5769),a(63238),a(61418),a(17460),a(14078);var n=a(65009),r=a.n(n),o=(a(72326),a(56705)),i=a(3319),l=a(44614),s=a(76543),u=a(61642);function c(){o.ZP.show();var e=this;return ApiClient.getNamedConfiguration(m).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(m,t).then((function(){var e;s.ZP.processServerConfigurationUpdateResult(),(e=[]).push(l.ZP.translate("MetadataSettingChangeHelp")),(0,u.Z)({text:e.join("<br/><br/>")})}))})),!1}function h(){return[{href:"#!/library.html",name:l.ZP.translate("HeaderLibraries")},{href:"#!/librarydisplay.html",name:l.ZP.translate("Display")},{href:"#!/metadataimages.html",name:l.ZP.translate("Metadata")},{href:"#!/metadatanfo.html",name:l.ZP.translate("TabNfoSettings")}]}var m="xbmcmetadata";$(document).on("pageinit","#metadataNfoPage",(function(){$(".metadataNfoForm").off("submit",c).on("submit",c)})).on("pageshow","#metadataNfoPage",(function(){i.Z.setTabs("metadata",3,h),o.ZP.show();var e=this,t=ApiClient.getUsers(),a=ApiClient.getNamedConfiguration(m);Promise.all([t,a]).then((function(t){!function(e,t,a){var n='<option value="" selected="selected">'+l.ZP.translate("None")+"</option>";n+=a.map((function(e){return'<option value="'+e.Id+'">'+r()(e.Name)+"</option>"})).join(""),$("#selectUser",e).html(n).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,o.ZP.hide()}(e,t[1],t[0])}))}))}}]);