From c40e9e11cd462d94cb387269f1f5810bb3c04c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Tue, 28 Sep 2021 01:05:00 +0200 Subject: [PATCH] Update: Cleanup code --- dist/plex-meets-homeassistant.js | 8 +------- src/editor.ts | 3 --- src/modules/PlayController.ts | 3 --- src/plex-meets-homeassistant.ts | 2 +- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 795a564..76a1e55 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19413,7 +19413,6 @@ class PlayController { 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); await this.playViaAndroidTV(entity.value, streamLink, instantPlay, provider); } else { @@ -19427,7 +19426,6 @@ class PlayController { 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}`); this.playViaCast(entity.value, `${streamURL}`, 'epg'); } else if (this.hass.services.plex) { @@ -19650,7 +19648,6 @@ class PlayController { }` }; */ - console.log(payload); this.hass.callService('media_player', 'play_media', payload); } }; @@ -19881,8 +19878,6 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { if (!this.config.entity) { this.config.entity = []; } - console.log(this.libraryName); - console.log(this.libraryName.value); if (!lodash.isEmpty(this.libraryName.value)) { this.config.libraryName = this.libraryName.value; let sortOrderValue = ''; @@ -19958,7 +19953,6 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { const libraryItem = document.createElement('paper-item'); libraryItem.innerHTML = text.replace(/ /g, ' '); libraryItem.label = text; - console.log('Test2'); if (disabled) { libraryItem.disabled = true; } @@ -21503,7 +21497,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { }); if (plexSections && sectionKey) { lodash.forEach(plexSections, section => { - this.data[section.title1] = section.Metadata; + this.data[section.librarySectionTitle] = section.Metadata; }); } const collections = await this.plex.getCollections(); diff --git a/src/editor.ts b/src/editor.ts index 3c47b46..ebaa23c 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -102,8 +102,6 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { if (!this.config.entity) { this.config.entity = []; } - console.log(this.libraryName); - console.log(this.libraryName.value); if (!_.isEmpty(this.libraryName.value)) { this.config.libraryName = this.libraryName.value; @@ -176,7 +174,6 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { const libraryItem: any = document.createElement('paper-item'); libraryItem.innerHTML = text.replace(/ /g, ' '); libraryItem.label = text; - console.log('Test2'); if (disabled) { libraryItem.disabled = true; } diff --git a/src/modules/PlayController.ts b/src/modules/PlayController.ts index 83b391c..5f65971 100644 --- a/src/modules/PlayController.ts +++ b/src/modules/PlayController.ts @@ -132,7 +132,6 @@ class PlayController { if (_.isEqual(data.type, 'epg')) { const session = `${Math.floor(Date.now() / 1000)}`; const streamLink = await this.plex.tune(data.channelIdentifier, session); - console.log(streamLink); await this.playViaAndroidTV(entity.value, streamLink, instantPlay, provider); } else { @@ -147,7 +146,6 @@ class PlayController { 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}`); this.playViaCast(entity.value, `${streamURL}`, 'epg'); } else if (this.hass.services.plex) { const libraryName = _.isNil(processData.librarySectionTitle) @@ -382,7 +380,6 @@ class PlayController { }; */ - console.log(payload); this.hass.callService('media_player', 'play_media', payload); } }; diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 7648217..9d0e152 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -459,7 +459,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { if (plexSections && sectionKey) { _.forEach(plexSections, section => { - this.data[section.title1] = section.Metadata; + this.data[section.librarySectionTitle] = section.Metadata; }); } const collections = await this.plex.getCollections();