From 1e7af5491c7cc6bd24217be517919f742f169100 Mon Sep 17 00:00:00 2001 From: Maaz Hassan Date: Fri, 29 Dec 2023 11:40:56 +0000 Subject: [PATCH] Add: "Play Next" button for podcast latest episodes --- .../pages/library/_library/podcast/latest.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/client/pages/library/_library/podcast/latest.vue b/client/pages/library/_library/podcast/latest.vue index d05658165..67168bfe2 100644 --- a/client/pages/library/_library/podcast/latest.vue +++ b/client/pages/library/_library/podcast/latest.vue @@ -57,6 +57,10 @@ + + @@ -220,6 +224,19 @@ export default { } this.$store.commit('addItemToQueue', queueItem) } + }, + playNextBtnClick(episode) { + const queueItem = { + libraryItemId: episode.libraryItemId, + libraryId: episode.libraryId, + episodeId: episode.id, + title: episode.title, + subtitle: episode.podcast.metadata.title, + caption: episode.publishedAt ? `Published ${this.$formatDate(episode.publishedAt, this.dateFormat)}` : 'Unknown publish date', + duration: episode.duration || null, + coverPath: episode.podcast.coverPath || null + } + this.$store.commit('addItemToTopOfQueue', queueItem) } }, mounted() {