From 21bdd9f9eccb5f86bafa7f91b5eb3c73dfe92505 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 24 Apr 2022 17:03:43 -0500 Subject: [PATCH] Fix set invalid flag to false when adding first episode to an empty podcast library item, dont show podcast errors on episode cards --- client/components/cards/LazyBookCard.vue | 1 + server/managers/PodcastManager.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 9d93301f..36891e79 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -272,6 +272,7 @@ export default { return this.userProgress ? !!this.userProgress.isFinished : false }, showError() { + if (this.recentEpisode) return false // Dont show podcast error on episode card return this.numMissingParts || this.isMissing || this.isInvalid }, isStreaming() { diff --git a/server/managers/PodcastManager.js b/server/managers/PodcastManager.js index 73e6d366..e5878038 100644 --- a/server/managers/PodcastManager.js +++ b/server/managers/PodcastManager.js @@ -122,6 +122,10 @@ class PodcastManager { var podcastEpisode = this.currentDownload.podcastEpisode podcastEpisode.audioFile = audioFile libraryItem.media.addPodcastEpisode(podcastEpisode) + if (libraryItem.isInvalid) { + // First episode added to an empty podcast + libraryItem.isInvalid = false + } libraryItem.libraryFiles.push(libraryFile) libraryItem.updatedAt = Date.now() await this.db.updateLibraryItem(libraryItem)