diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 06a9a97..9f1b094 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19401,7 +19401,7 @@ class PlayController { const entity = this.getPlayService(data); let processData = data; let provider; - if (!lodash.isNil(data.epg)) { + if (lodash.isEqual(data.type, 'epg')) { processData = data.epg; provider = ''; } @@ -19410,7 +19410,7 @@ class PlayController { await this.playViaKodi(entity.value, data, data.type); break; case 'androidtv': - if (!lodash.isNil(data.epg)) { + if (lodash.isEqual(data.type, 'epg')) { const session = `${Math.floor(Date.now() / 1000)}`; const streamLink = await this.plex.tune(data.channelIdentifier, session); console.log(streamLink); @@ -19424,7 +19424,7 @@ class PlayController { await this.playViaPlexPlayer(entity.value, processData.key.split('/')[3]); break; case 'cast': - if (!lodash.isNil(data.epg)) { + if (lodash.isEqual(data.type, 'epg')) { const session = `PlexMeetsHomeAssistant-${Math.floor(Date.now() / 1000)}`; const streamURL = await this.plex.tune(data.channelIdentifier, session); console.log(`${this.plex.getBasicURL()}${streamURL}`); diff --git a/src/modules/PlayController.ts b/src/modules/PlayController.ts index 80f62f5..0dc0193 100644 --- a/src/modules/PlayController.ts +++ b/src/modules/PlayController.ts @@ -120,7 +120,7 @@ class PlayController { let processData = data; let provider; - if (!_.isNil(data.epg)) { + if (_.isEqual(data.type, 'epg')) { processData = data.epg; provider = ''; } @@ -129,7 +129,7 @@ class PlayController { await this.playViaKodi(entity.value, data, data.type); break; case 'androidtv': - if (!_.isNil(data.epg)) { + if (_.isEqual(data.type, 'epg')) { const session = `${Math.floor(Date.now() / 1000)}`; const streamLink = await this.plex.tune(data.channelIdentifier, session); console.log(streamLink); @@ -144,7 +144,7 @@ class PlayController { await this.playViaPlexPlayer(entity.value, processData.key.split('/')[3]); break; case 'cast': - if (!_.isNil(data.epg)) { + if (_.isEqual(data.type, 'epg')) { const session = `PlexMeetsHomeAssistant-${Math.floor(Date.now() / 1000)}`; const streamURL = await this.plex.tune(data.channelIdentifier, session); console.log(`${this.plex.getBasicURL()}${streamURL}`);