diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 057730d..e83cc03 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19893,7 +19893,10 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { this.libraryName.appendChild(libraryItems); this.libraryName.style.width = '100%'; this.libraryName.addEventListener('value-changed', this.valueUpdated); + const warningLibrary = document.createElement('div'); + warningLibrary.style.color = 'red'; this.content.appendChild(this.libraryName); + this.content.appendChild(warningLibrary); this.appendChild(this.content); this.plex = new Plex(this.config.ip, this.plexPort, this.config.token, this.plexProtocol, this.config.sort); this.sections = await this.plex.getSections(); @@ -20110,6 +20113,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { if (!lodash.isEmpty(this.livetv)) { libraryItems.appendChild(addDropdownItem('Live TV', true)); lodash.forEach(lodash.keys(this.livetv), (livetv) => { + if (lodash.isEqual(this.config.libraryName, livetv)) { + warningLibrary.textContent = `Warning: ${this.config.libraryName} play action currently not supported by Plex.`; + } libraryItems.appendChild(addDropdownItem(livetv)); }); } diff --git a/src/editor.ts b/src/editor.ts index 3ff32ad..0904995 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -296,7 +296,11 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { this.libraryName.appendChild(libraryItems); this.libraryName.style.width = '100%'; this.libraryName.addEventListener('value-changed', this.valueUpdated); + + const warningLibrary = document.createElement('div'); + warningLibrary.style.color = 'red'; this.content.appendChild(this.libraryName); + this.content.appendChild(warningLibrary); this.appendChild(this.content); @@ -525,6 +529,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { if (!_.isEmpty(this.livetv)) { libraryItems.appendChild(addDropdownItem('Live TV', true)); _.forEach(_.keys(this.livetv), (livetv: string) => { + if (_.isEqual(this.config.libraryName, livetv)) { + warningLibrary.textContent = `Warning: ${this.config.libraryName} play action currently not supported by Plex.`; + } libraryItems.appendChild(addDropdownItem(livetv)); }); }