More cleanup

pull/40/head
Juraj Nyíri 3 years ago
parent 736fa3e413
commit 415db4c4bd

@ -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}`);

@ -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}`);

Loading…
Cancel
Save