From 33ae93e61e2f1c752e41e1a1a042e9ef4b350f58 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 20 Aug 2022 19:32:37 -0500 Subject: [PATCH] Fix:Add new podcast crash #920 --- server/controllers/LibraryItemController.js | 5 ----- server/controllers/PodcastController.js | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/server/controllers/LibraryItemController.js b/server/controllers/LibraryItemController.js index 9fbd1a96..328e75a5 100644 --- a/server/controllers/LibraryItemController.js +++ b/server/controllers/LibraryItemController.js @@ -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()) diff --git a/server/controllers/PodcastController.js b/server/controllers/PodcastController.js index d633c8ed..0ac233ee 100644 --- a/server/controllers/PodcastController.js +++ b/server/controllers/PodcastController.js @@ -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) } }