diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 2853fb3..b0c6375 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -23120,9 +23120,18 @@ class PlexMeetsHomeAssistant extends HTMLElement { if (this.episodesElem) { this.episodesElem.style.transition = `0.7s`; if (this.activeMovieElem) { - this.episodesElem.style.top = `${top + getHeight(this.activeMovieElem) + 16 * 2}px`; + if (!lodash.isEmpty(lodash.get(data, 'thumb'))) { + this.episodesElem.style.top = `${top + getHeight(this.activeMovieElem) + 16 * 2}px`; + } + else if (this.detailElem) { + this.episodesElem.style.top = `${top + getHeight(this.detailElem)}px`; + } + else { + this.episodesElem.style.top = `${top}px`; + } } else { + console.log('2'); this.episodesElem.style.top = `${top + this.minExpandedHeight + 16}px`; } this.resizeBackground(); diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 561361e..f2ba2fa 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -1508,7 +1508,13 @@ class PlexMeetsHomeAssistant extends HTMLElement { if (this.episodesElem) { this.episodesElem.style.transition = `0.7s`; if (this.activeMovieElem) { - this.episodesElem.style.top = `${top + getHeight(this.activeMovieElem) + 16 * 2}px`; + if (!_.isEmpty(_.get(data, 'thumb'))) { + this.episodesElem.style.top = `${top + getHeight(this.activeMovieElem) + 16 * 2}px`; + } else if (this.detailElem) { + this.episodesElem.style.top = `${top + getHeight(this.detailElem)}px`; + } else { + this.episodesElem.style.top = `${top}px`; + } } else { this.episodesElem.style.top = `${top + this.minExpandedHeight + 16}px`; }