|
|
@ -19477,8 +19477,20 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
const seasonElem = document.createElement('div');
|
|
|
|
const seasonElem = document.createElement('div');
|
|
|
|
seasonElem.className = 'seasonElem';
|
|
|
|
seasonElem.className = 'seasonElem';
|
|
|
|
seasonElem.style.width = `${CSS_STYLE.width}px`;
|
|
|
|
seasonElem.style.width = `${CSS_STYLE.width}px`;
|
|
|
|
seasonElem.style.height = `${CSS_STYLE.height}px`;
|
|
|
|
seasonElem.style.height = `${CSS_STYLE.height - 3}px`;
|
|
|
|
seasonElem.style.backgroundImage = `url('${thumbURL}')`;
|
|
|
|
seasonElem.style.backgroundImage = `url('${thumbURL}')`;
|
|
|
|
|
|
|
|
const interactiveArea = document.createElement('div');
|
|
|
|
|
|
|
|
interactiveArea.className = 'interactiveArea';
|
|
|
|
|
|
|
|
const playButton = document.createElement('button');
|
|
|
|
|
|
|
|
playButton.name = 'playButton';
|
|
|
|
|
|
|
|
playButton.addEventListener('click', event => {
|
|
|
|
|
|
|
|
event.stopPropagation();
|
|
|
|
|
|
|
|
if (this.plex && this.playController) {
|
|
|
|
|
|
|
|
this.playController.play(seasonData.key.split('/')[3]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
interactiveArea.append(playButton);
|
|
|
|
|
|
|
|
seasonElem.append(interactiveArea);
|
|
|
|
seasonContainer.append(seasonElem);
|
|
|
|
seasonContainer.append(seasonElem);
|
|
|
|
const seasonTitleElem = document.createElement('div');
|
|
|
|
const seasonTitleElem = document.createElement('div');
|
|
|
|
seasonTitleElem.className = 'seasonTitleElem';
|
|
|
|
seasonTitleElem.className = 'seasonTitleElem';
|
|
|
@ -19491,8 +19503,9 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
seasonContainer.addEventListener('click', event => {
|
|
|
|
seasonContainer.addEventListener('click', event => {
|
|
|
|
event.stopPropagation();
|
|
|
|
event.stopPropagation();
|
|
|
|
(async () => {
|
|
|
|
(async () => {
|
|
|
|
if (this.plex) {
|
|
|
|
if (this.plex && this.playController) {
|
|
|
|
console.log(seasonData);
|
|
|
|
console.log(seasonData);
|
|
|
|
|
|
|
|
// this.playController.play(seasonData.key.split('/')[3]);
|
|
|
|
console.log(await this.plex.getLibraryData(seasonData.key.split('/')[3]));
|
|
|
|
console.log(await this.plex.getLibraryData(seasonData.key.split('/')[3]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})();
|
|
|
|
})();
|
|
|
|