diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 92c8f0b..09ce1d5 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -21434,7 +21434,15 @@ class PlexMeetsHomeAssistant extends HTMLElement { this.episodesElem.innerHTML = ''; this.episodesElem.style.transition = `0s`; this.episodesElem.style.top = `${top + 2000}px`; - if (this.showExtras) { + if (lodash.isEqual(data.type, 'season')) { + const episodesData = await this.plex.getLibraryData(data.key.split('/')[3]); + lodash.forEach(episodesData, episodeData => { + if (this.episodesElem && this.playController && this.plex) { + this.episodesElem.append(createEpisodesView(this.playController, this.plex, episodeData)); + } + }); + } + else if (this.showExtras) { const extras = dataDetails.Extras.Metadata; lodash.forEach(extras, extrasData => { if (this.episodesElem && this.playController && this.plex) { diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index b132ec1..80e5f0b 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -1250,8 +1250,14 @@ class PlexMeetsHomeAssistant extends HTMLElement { this.episodesElem.innerHTML = ''; this.episodesElem.style.transition = `0s`; this.episodesElem.style.top = `${top + 2000}px`; - - if (this.showExtras) { + if (_.isEqual(data.type, 'season')) { + const episodesData = await this.plex.getLibraryData(data.key.split('/')[3]); + _.forEach(episodesData, episodeData => { + if (this.episodesElem && this.playController && this.plex) { + this.episodesElem.append(createEpisodesView(this.playController, this.plex, episodeData)); + } + }); + } else if (this.showExtras) { const extras = dataDetails.Extras.Metadata; _.forEach(extras, extrasData => { if (this.episodesElem && this.playController && this.plex) { @@ -1259,7 +1265,6 @@ class PlexMeetsHomeAssistant extends HTMLElement { } }); } - clearInterval(this.episodesLoadTimeout); this.episodesLoadTimeout = setTimeout(() => { if (this.episodesElem) {