Fix set invalid flag to false when adding first episode to an empty podcast library item, dont show podcast errors on episode cards

This commit is contained in:
advplyr 2022-04-24 17:03:43 -05:00
parent e3ae3f7e6a
commit 21bdd9f9ec
2 changed files with 5 additions and 0 deletions

View file

@ -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)