From 1de9854afc24ca1cd791e14d97e7ad0335236252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Tue, 19 Oct 2021 15:29:34 +0200 Subject: [PATCH] Fix: Loading seasons when episode opened --- dist/plex-meets-homeassistant.js | 3 +-- src/plex-meets-homeassistant.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index b0c6375..6276d23 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -22970,7 +22970,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { if (this.plex) { let childrenData = {}; 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 || lodash.isEqual(data.type, 'artist') || @@ -23131,7 +23131,6 @@ class PlexMeetsHomeAssistant extends HTMLElement { } } else { - console.log('2'); this.episodesElem.style.top = `${top + this.minExpandedHeight + 16}px`; } this.resizeBackground(); diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index f2ba2fa..68ada28 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -1344,7 +1344,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { if (this.plex) { let childrenData: Record = {}; if (_.isEqual(data.type, 'episode')) { - childrenData = await this.plex.getLibraryData(data.grandparentKey); + childrenData = await this.plex.getLibraryData(`${data.grandparentKey}/children`); } else if ( data.childCount > 0 || _.isEqual(data.type, 'artist') ||