|
|
@ -1250,8 +1250,14 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
this.episodesElem.innerHTML = '';
|
|
|
|
this.episodesElem.innerHTML = '';
|
|
|
|
this.episodesElem.style.transition = `0s`;
|
|
|
|
this.episodesElem.style.transition = `0s`;
|
|
|
|
this.episodesElem.style.top = `${top + 2000}px`;
|
|
|
|
this.episodesElem.style.top = `${top + 2000}px`;
|
|
|
|
|
|
|
|
if (_.isEqual(data.type, 'season')) {
|
|
|
|
if (this.showExtras) {
|
|
|
|
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;
|
|
|
|
const extras = dataDetails.Extras.Metadata;
|
|
|
|
_.forEach(extras, extrasData => {
|
|
|
|
_.forEach(extras, extrasData => {
|
|
|
|
if (this.episodesElem && this.playController && this.plex) {
|
|
|
|
if (this.episodesElem && this.playController && this.plex) {
|
|
|
@ -1259,7 +1265,6 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
clearInterval(this.episodesLoadTimeout);
|
|
|
|
clearInterval(this.episodesLoadTimeout);
|
|
|
|
this.episodesLoadTimeout = setTimeout(() => {
|
|
|
|
this.episodesLoadTimeout = setTimeout(() => {
|
|
|
|
if (this.episodesElem) {
|
|
|
|
if (this.episodesElem) {
|
|
|
|