|
|
|
@ -21543,6 +21543,7 @@ style.textContent = css `
|
|
|
|
|
class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
|
constructor() {
|
|
|
|
|
super(...arguments);
|
|
|
|
|
this.renderPageRetries = 0;
|
|
|
|
|
this.searchInputElem = document.createElement('input');
|
|
|
|
|
this.plexProtocol = 'http';
|
|
|
|
|
this.useHorizontalScroll = false;
|
|
|
|
@ -21994,13 +21995,13 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
|
else {
|
|
|
|
|
this.contentContainer.style.width = `${parseFloat(this.contentContainer.style.width) +
|
|
|
|
|
getWidth(movieElem) +
|
|
|
|
|
10}px`;
|
|
|
|
|
10.15}px`;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.renderedItems += 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (shouldRender && lastRowTop !== movieElem.getBoundingClientRect().top) {
|
|
|
|
|
if (shouldRender && lastRowTop !== movieElem.getBoundingClientRect().top && !this.useHorizontalScroll) {
|
|
|
|
|
this.renderedRows += 1;
|
|
|
|
|
if (lastRowTop !== 0 && this.columnsCount === 0) {
|
|
|
|
|
this.columnsCount = this.renderedItems - 1;
|
|
|
|
@ -22010,14 +22011,13 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
|
this.maxRenderCount = this.renderedItems - 1 + this.columnsCount * loadAdditionalRowsCount;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (this.maxRows && this.renderedRows > this.maxRows) {
|
|
|
|
|
if (this.maxRows && this.renderedRows > this.maxRows && !this.useHorizontalScroll) {
|
|
|
|
|
movieElem.remove();
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
this.contentContainer.style.width = `${parseFloat(this.contentContainer.style.width) + 5}px`;
|
|
|
|
|
}
|
|
|
|
|
const contentbg = this.getElementsByClassName('contentbg')[0];
|
|
|
|
|
this.contentBGHeight = getHeight(contentbg);
|
|
|
|
@ -22041,12 +22041,17 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
|
CSS_STYLE.episodeWidth = Math.floor(areaSize / episodesInRow - marginRight);
|
|
|
|
|
CSS_STYLE.episodeHeight = Math.round(CSS_STYLE.episodeWidth * CSS_STYLE.episodeRatio);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
else if (this.renderPageRetries < 10) {
|
|
|
|
|
{
|
|
|
|
|
// sometimes it loop forever, todo: properly fix!
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.renderPageRetries += 1;
|
|
|
|
|
console.log('retry');
|
|
|
|
|
this.renderPage();
|
|
|
|
|
}, 250);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.renderedItems = 0;
|
|
|
|
|
// this.columnsCount = 0;
|
|
|
|
|
const spinner = document.createElement('div');
|
|
|
|
|