Add: Enable folders in UI editor

pull/52/head
Juraj Nyíri 3 years ago
parent 468947b6d9
commit 6152c3b359

@ -20833,8 +20833,11 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
typeItems.appendChild(addDropdownItem('', ''));
let typeAvailable = false;
lodash.forEach(types, (sectionType) => {
if (sectionType.type !== 'folder' && sectionType.type !== 'track' && sectionType.type !== 'episode') {
const key = sectionType.key.split('type=')[1];
if (sectionType.type !== 'track' && sectionType.type !== 'episode') {
let key = sectionType.key.split('type=')[1];
if (sectionType.type === 'folder') {
key = 'folder';
}
if (lodash.isEqual(key, this.config.displayType)) {
typeAvailable = true;
}

@ -797,8 +797,11 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
typeItems.appendChild(addDropdownItem('', ''));
let typeAvailable = false;
_.forEach(types, (sectionType: Record<string, any>) => {
if (sectionType.type !== 'folder' && sectionType.type !== 'track' && sectionType.type !== 'episode') {
const key = sectionType.key.split('type=')[1];
if (sectionType.type !== 'track' && sectionType.type !== 'episode') {
let key = sectionType.key.split('type=')[1];
if (sectionType.type === 'folder') {
key = 'folder';
}
if (_.isEqual(key, this.config.displayType)) {
typeAvailable = true;
}

Loading…
Cancel
Save