diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index 57a1ae74..1baf521c 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -638,6 +638,11 @@ export default { this.episodesDownloading = this.episodesDownloading.filter((d) => d.id !== episodeDownload.id) } }, + episodeDownloadQueueCleared(libraryItemId) { + if (libraryItemId === this.libraryItemId) { + this.episodeDownloadsQueued = [] + } + }, rssFeedOpen(data) { if (data.entityId === this.libraryItemId) { console.log('RSS Feed Opened', data) @@ -776,6 +781,7 @@ export default { this.$root.socket.on('episode_download_queued', this.episodeDownloadQueued) this.$root.socket.on('episode_download_started', this.episodeDownloadStarted) this.$root.socket.on('episode_download_finished', this.episodeDownloadFinished) + this.$root.socket.on('episode_download_queue_cleared', this.episodeDownloadQueueCleared) }, beforeDestroy() { this.$eventBus.$off(`${this.libraryItem.id}_updated`, this.libraryItemUpdated) @@ -787,6 +793,7 @@ export default { this.$root.socket.off('episode_download_queued', this.episodeDownloadQueued) this.$root.socket.off('episode_download_started', this.episodeDownloadStarted) this.$root.socket.off('episode_download_finished', this.episodeDownloadFinished) + this.$root.socket.off('episode_download_queue_cleared', this.episodeDownloadQueueCleared) } } diff --git a/server/managers/PodcastManager.js b/server/managers/PodcastManager.js index 01e661d9..0a32e3ca 100644 --- a/server/managers/PodcastManager.js +++ b/server/managers/PodcastManager.js @@ -46,6 +46,7 @@ class PodcastManager { var itemDownloads = this.getEpisodeDownloadsInQueue(libraryItemId) Logger.info(`[PodcastManager] Clearing downloads in queue for item "${libraryItemId}" (${itemDownloads.length})`) this.downloadQueue = this.downloadQueue.filter((d) => d.libraryItemId !== libraryItemId) + SocketAuthority.emitter('episode_download_queue_cleared', libraryItemId) } }