Fix: Loading seasons when episode opened

pull/52/head
Juraj Nyíri 3 years ago
parent 113788b50d
commit 1de9854afc

@ -22970,7 +22970,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
if (this.plex) { if (this.plex) {
let childrenData = {}; let childrenData = {};
if (lodash.isEqual(data.type, 'episode')) { if (lodash.isEqual(data.type, 'episode')) {
childrenData = await this.plex.getLibraryData(data.grandparentKey); childrenData = await this.plex.getLibraryData(`${data.grandparentKey}/children`);
} }
else if (data.childCount > 0 || else if (data.childCount > 0 ||
lodash.isEqual(data.type, 'artist') || lodash.isEqual(data.type, 'artist') ||
@ -23131,7 +23131,6 @@ class PlexMeetsHomeAssistant extends HTMLElement {
} }
} }
else { else {
console.log('2');
this.episodesElem.style.top = `${top + this.minExpandedHeight + 16}px`; this.episodesElem.style.top = `${top + this.minExpandedHeight + 16}px`;
} }
this.resizeBackground(); this.resizeBackground();

@ -1344,7 +1344,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
if (this.plex) { if (this.plex) {
let childrenData: Record<string, any> = {}; let childrenData: Record<string, any> = {};
if (_.isEqual(data.type, 'episode')) { if (_.isEqual(data.type, 'episode')) {
childrenData = await this.plex.getLibraryData(data.grandparentKey); childrenData = await this.plex.getLibraryData(`${data.grandparentKey}/children`);
} else if ( } else if (
data.childCount > 0 || data.childCount > 0 ||
_.isEqual(data.type, 'artist') || _.isEqual(data.type, 'artist') ||

Loading…
Cancel
Save