import escapeHtml from 'escape-html'; import 'jquery'; import globalize from '../../../scripts/globalize'; import loading from '../../../components/loading/loading'; import libraryMenu from '../../../scripts/libraryMenu'; import '../../../components/listview/listview.scss'; import '../../../elements/emby-button/emby-button'; import confirm from '../../../components/confirm/confirm'; function loadProfiles(page) { loading.show(); ApiClient.getJSON(ApiClient.getUrl('Dlna/ProfileInfos')).then(function (result) { renderUserProfiles(page, result); renderSystemProfiles(page, result); loading.hide(); }); } function renderUserProfiles(page, profiles) { renderProfiles(page, page.querySelector('.customProfiles'), profiles.filter(function (p) { return p.Type == 'User'; })); } function renderSystemProfiles(page, profiles) { renderProfiles(page, page.querySelector('.systemProfiles'), profiles.filter(function (p) { return p.Type == 'System'; })); } function renderProfiles(page, element, profiles) { let html = ''; if (profiles.length) { html += '