|
|
|
@ -21151,7 +21151,6 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
|
}
|
|
|
|
|
await this.plex.init();
|
|
|
|
|
const plexAllSections = await this.plex.getSections();
|
|
|
|
|
console.log(await this.plex.getLiveTV());
|
|
|
|
|
const getOnDeck = async () => {
|
|
|
|
|
if (this.plex) {
|
|
|
|
|
try {
|
|
|
|
@ -21229,6 +21228,14 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const getLiveTV = async () => {
|
|
|
|
|
if (this.plex) {
|
|
|
|
|
const liveTV = await this.plex.getLiveTV();
|
|
|
|
|
lodash.forEach(liveTV, (data, key) => {
|
|
|
|
|
this.data[key] = data;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
let sectionKey = 0;
|
|
|
|
|
lodash.forEach(plexAllSections, (section) => {
|
|
|
|
|
if (lodash.isEqual(section.title, this.config.libraryName)) {
|
|
|
|
@ -21253,6 +21260,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
|
else if (lodash.isEqual(this.config.libraryName, 'Recently Added')) {
|
|
|
|
|
loadDataRequests.push(getRecentyAdded());
|
|
|
|
|
}
|
|
|
|
|
loadDataRequests.push(getLiveTV());
|
|
|
|
|
const [plexSections] = await Promise.all(loadDataRequests);
|
|
|
|
|
if (plexSections && sectionKey) {
|
|
|
|
|
lodash.forEach(plexSections, section => {
|
|
|
|
|