Update: Enable folder display view only for music

pull/52/head
Juraj Nyíri 3 years ago
parent ffffa0d50b
commit a99ced6b26

@ -20848,7 +20848,10 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
typeItems.appendChild(addDropdownItem('', ''));
let typeAvailable = false;
lodash.forEach(types, (sectionType) => {
if (sectionType.type !== 'track' && sectionType.type !== 'episode') {
if (sectionType.type !== 'track' &&
sectionType.type !== 'episode' &&
(sectionType.type !== 'folder' ||
(sectionType.type === 'folder' && lodash.isEqual(lodash.get(libraryData, '[0].viewGroup'), 'artist')))) {
let key = sectionType.key.split('type=')[1];
if (sectionType.type === 'folder') {
key = 'folder';

@ -797,7 +797,12 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
typeItems.appendChild(addDropdownItem('', ''));
let typeAvailable = false;
_.forEach(types, (sectionType: Record<string, any>) => {
if (sectionType.type !== 'track' && sectionType.type !== 'episode') {
if (
sectionType.type !== 'track' &&
sectionType.type !== 'episode' &&
(sectionType.type !== 'folder' ||
(sectionType.type === 'folder' && _.isEqual(_.get(libraryData, '[0].viewGroup'), 'artist')))
) {
let key = sectionType.key.split('type=')[1];
if (sectionType.type === 'folder') {
key = 'folder';

Loading…
Cancel
Save