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