Fix:Add new podcast crash #920

This commit is contained in:
advplyr 2022-08-20 19:32:37 -05:00
parent 3b961c424f
commit 33ae93e61e
2 changed files with 2 additions and 7 deletions

View File

@ -51,11 +51,6 @@ class LibraryItemController {
var hasUpdates = libraryItem.update(req.body)
if (hasUpdates) {
// Turn on podcast auto download cron if not already on
if (libraryItem.mediaType == 'podcast' && req.body.media.autoDownloadEpisodes && !this.podcastManager.episodeScheduleTask) {
this.podcastManager.schedulePodcastEpisodeCron()
}
Logger.debug(`[LibraryItemController] Updated now saving`)
await this.db.updateLibraryItem(libraryItem)
this.emitter('item_updated', libraryItem.toJSONExpanded())

View File

@ -86,8 +86,8 @@ class PodcastController {
}
// Turn on podcast auto download cron if not already on
if (libraryItem.media.autoDownloadEpisodes && !this.podcastManager.episodeScheduleTask) {
this.podcastManager.schedulePodcastEpisodeCron()
if (libraryItem.media.autoDownloadEpisodes) {
this.cronManager.checkUpdatePodcastCron(libraryItem)
}
}