From d42cbfe3e46e6e1e55bdc73fa20ea3bc782a8981 Mon Sep 17 00:00:00 2001 From: advplyr Date: Tue, 4 Jun 2024 16:21:28 -0500 Subject: [PATCH] Revert podcast episode local playback event --- .../tables/podcast/LatestEpisodeRow.vue | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/components/tables/podcast/LatestEpisodeRow.vue b/components/tables/podcast/LatestEpisodeRow.vue index 97242af0..27c5a6f1 100644 --- a/components/tables/podcast/LatestEpisodeRow.vue +++ b/components/tables/podcast/LatestEpisodeRow.vue @@ -265,12 +265,21 @@ export default { this.$eventBus.$emit('pause-item') } else { this.$store.commit('setPlayerIsStartingPlayback', this.episode.id) - this.$eventBus.$emit('play-item', { - libraryItemId: this.libraryItemId, - episodeId: this.episode.id, - serverLibraryItemId: this.libraryItemId, - serverEpisodeId: this.episode.id - }) + + if (this.localEpisode && this.localLibraryItemId) { + console.log('Play local episode', this.localEpisode.id, this.localLibraryItemId) + this.$eventBus.$emit('play-item', { + libraryItemId: this.localLibraryItemId, + episodeId: this.localEpisode.id, + serverLibraryItemId: this.libraryItemId, + serverEpisodeId: this.episode.id + }) + } else { + this.$eventBus.$emit('play-item', { + libraryItemId: this.libraryItemId, + episodeId: this.episode.id + }) + } } }, async toggleFinished() {