2.0
Juraj Nyíri 3 years ago
parent 3b0adffaa0
commit cb9f0cbab0

@ -19845,13 +19845,13 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
this.libraryName.disabled = false; this.libraryName.disabled = false;
this.libraryName.value = this.config.libraryName; this.libraryName.value = this.config.libraryName;
let libraryType = ''; let libraryType = '';
// eslint-disable-next-line consistent-return
lodash.forEach(this.sections, section => { lodash.forEach(this.sections, section => {
if (lodash.isEqual(section.title, this.libraryName.value)) { if (lodash.isEqual(section.title, this.libraryName.value)) {
libraryType = section.type; libraryType = section.type;
return false; return false;
} }
}); });
console.log(libraryType);
if (lodash.isEqual(libraryType, 'show')) { if (lodash.isEqual(libraryType, 'show')) {
sortItems.appendChild(addDropdownItem('titleSort')); sortItems.appendChild(addDropdownItem('titleSort'));
sortItems.appendChild(addDropdownItem('title')); sortItems.appendChild(addDropdownItem('title'));

@ -460,13 +460,13 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
this.libraryName.value = this.config.libraryName; this.libraryName.value = this.config.libraryName;
let libraryType = ''; let libraryType = '';
// eslint-disable-next-line consistent-return
_.forEach(this.sections, section => { _.forEach(this.sections, section => {
if (_.isEqual(section.title, this.libraryName.value)) { if (_.isEqual(section.title, this.libraryName.value)) {
libraryType = section.type; libraryType = section.type;
return false; return false;
} }
}); });
console.log(libraryType);
if (_.isEqual(libraryType, 'show')) { if (_.isEqual(libraryType, 'show')) {
sortItems.appendChild(addDropdownItem('titleSort')); sortItems.appendChild(addDropdownItem('titleSort'));
sortItems.appendChild(addDropdownItem('title')); sortItems.appendChild(addDropdownItem('title'));

Loading…
Cancel
Save