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

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

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)