(self.webpackChunk=self.webpackChunk||[]).push([[4108],{81719:function(e,n,t){"use strict";t.r(n),t(5769),t(61013),t(63238),t(61418),t(17460),t(14078),t(71848);var a=t(6594),l=t(17025),s=t(53754),i=t(76543);function r(){a.ZP.show();var e=this;return ApiClient.getNamedConfiguration("dlna").then((function(n){n.EnablePlayTo=e.querySelector("#chkEnablePlayTo").checked,n.EnableDebugLog=e.querySelector("#chkEnableDlnaDebugLogging").checked,n.ClientDiscoveryIntervalSeconds=$("#txtClientDiscoveryInterval",e).val(),n.EnableServer=$("#chkEnableServer",e).is(":checked"),n.BlastAliveMessages=$("#chkBlastAliveMessages",e).is(":checked"),n.BlastAliveMessageIntervalSeconds=$("#txtBlastInterval",e).val(),n.DefaultUserId=$("#selectUser",e).val(),ApiClient.updateNamedConfiguration("dlna",n).then(i.ZP.processServerConfigurationUpdateResult)})),!1}function o(){return[{href:"#!/dlnasettings.html",name:s.ZP.translate("Settings")},{href:"#!/dlnaprofiles.html",name:s.ZP.translate("TabProfiles")}]}$(document).on("pageinit","#dlnaSettingsPage",(function(){$(".dlnaSettingsForm").off("submit",r).on("submit",r)})).on("pageshow","#dlnaSettingsPage",(function(){l.Z.setTabs("dlna",0,o),a.ZP.show();var e=this,n=ApiClient.getNamedConfiguration("dlna"),t=ApiClient.getUsers();Promise.all([n,t]).then((function(n){!function(e,n,t){e.querySelector("#chkEnablePlayTo").checked=n.EnablePlayTo,e.querySelector("#chkEnableDlnaDebugLogging").checked=n.EnableDebugLog,$("#txtClientDiscoveryInterval",e).val(n.ClientDiscoveryIntervalSeconds),$("#chkEnableServer",e).prop("checked",n.EnableServer),$("#chkBlastAliveMessages",e).prop("checked",n.BlastAliveMessages),$("#txtBlastInterval",e).val(n.BlastAliveMessageIntervalSeconds);var l=t.map((function(e){return'<option value="'+e.Id+'">'+e.Name+"</option>"})).join("");$("#selectUser",e).html(l).val(n.DefaultUserId||""),a.ZP.hide()}(e,n[0],n[1])}))}))}}]);