Fix: Disable sort for folders

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

@ -20890,7 +20890,7 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
});
}
const sortFields = lodash.get(libraryData, `[0].Meta.Type[${displayTypeIndex}].Sort`);
if (!lodash.isNil(sortFields) && sortFields.length > 0) {
if (!lodash.isNil(sortFields) && sortFields.length > 0 && this.config.displayType !== 'folder') {
lodash.forEach(sortFields, (sortField) => {
sortItems.appendChild(addDropdownItem(sortField.key));
});

@ -838,7 +838,7 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
});
}
const sortFields = _.get(libraryData, `[0].Meta.Type[${displayTypeIndex}].Sort`);
if (!_.isNil(sortFields) && sortFields.length > 0) {
if (!_.isNil(sortFields) && sortFields.length > 0 && this.config.displayType !== 'folder') {
_.forEach(sortFields, (sortField: Record<string, any>) => {
sortItems.appendChild(addDropdownItem(sortField.key));
});

Loading…
Cancel
Save