|
|
@ -20782,7 +20782,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
window.addEventListener('scroll', () => {
|
|
|
|
window.addEventListener('scroll', () => {
|
|
|
|
// todo: improve performance by calculating this when needed only
|
|
|
|
// todo: improve performance by calculating this when needed only
|
|
|
|
if (this.detailsShown && this.activeMovieElem && !isVideoFullScreen(this)) {
|
|
|
|
if (this.detailsShown && this.activeMovieElem && !isVideoFullScreen(this) && this.isVisible) {
|
|
|
|
const seasonContainers = this.getElementsByClassName('seasonContainer');
|
|
|
|
const seasonContainers = this.getElementsByClassName('seasonContainer');
|
|
|
|
const episodeContainers = this.getElementsByClassName('episodeContainer');
|
|
|
|
const episodeContainers = this.getElementsByClassName('episodeContainer');
|
|
|
|
const seasonElems = this.getElementsByClassName('seasonElem');
|
|
|
|
const seasonElems = this.getElementsByClassName('seasonElem');
|
|
|
@ -20822,22 +20822,24 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
window.addEventListener('resize', () => {
|
|
|
|
window.addEventListener('resize', () => {
|
|
|
|
if (!this.detailsShown) {
|
|
|
|
if (this.isVisible) {
|
|
|
|
const videoPlayer = this.getElementsByClassName('videoPlayer')[0];
|
|
|
|
if (!this.detailsShown) {
|
|
|
|
let isFullScreen = false;
|
|
|
|
const videoPlayer = this.getElementsByClassName('videoPlayer')[0];
|
|
|
|
if (videoPlayer.children.length > 0) {
|
|
|
|
let isFullScreen = false;
|
|
|
|
isFullScreen = isVideoFullScreen(this);
|
|
|
|
if (videoPlayer.children.length > 0) {
|
|
|
|
}
|
|
|
|
isFullScreen = isVideoFullScreen(this);
|
|
|
|
if (this.card && this.movieElems.length > 0 && !isFullScreen) {
|
|
|
|
}
|
|
|
|
if (this.previousPageWidth !== this.card.offsetWidth) {
|
|
|
|
if (this.card && this.movieElems.length > 0 && !isFullScreen) {
|
|
|
|
this.previousPageWidth = this.card.offsetWidth;
|
|
|
|
if (this.previousPageWidth !== this.card.offsetWidth) {
|
|
|
|
this.renderPage();
|
|
|
|
this.previousPageWidth = this.card.offsetWidth;
|
|
|
|
const contentbg = this.getElementsByClassName('contentbg');
|
|
|
|
this.renderPage();
|
|
|
|
this.contentBGHeight = getHeight(contentbg[0]);
|
|
|
|
const contentbg = this.getElementsByClassName('contentbg');
|
|
|
|
|
|
|
|
this.contentBGHeight = getHeight(contentbg[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (this.card) {
|
|
|
|
if (this.card) {
|
|
|
|
this.previousPageWidth = this.card.offsetWidth;
|
|
|
|
this.previousPageWidth = this.card.offsetWidth;
|
|
|
|