From 52203611513d2fe583183bf7abe1c328a5f273e8 Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 3 Nov 2023 07:07:58 -0500 Subject: [PATCH] Fix:Podcast episode cron not adding/removing library items correctly #2277 --- server/managers/CronManager.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/managers/CronManager.js b/server/managers/CronManager.js index c44ad70d0c..6d8f66665e 100644 --- a/server/managers/CronManager.js +++ b/server/managers/CronManager.js @@ -127,8 +127,7 @@ class CronManager { } } - async executePodcastCron(expression, libraryItemIds) { - Logger.debug(`[CronManager] Start executing podcast cron ${expression} for ${libraryItemIds.length} item(s)`) + async executePodcastCron(expression) { const podcastCron = this.podcastCrons.find(cron => cron.expression === expression) if (!podcastCron) { Logger.error(`[CronManager] Podcast cron not found for expression ${expression}`) @@ -136,6 +135,9 @@ class CronManager { } this.podcastCronExpressionsExecuting.push(expression) + const libraryItemIds = podcastCron.libraryItemIds + Logger.debug(`[CronManager] Start executing podcast cron ${expression} for ${libraryItemIds.length} item(s)`) + // Get podcast library items to check const libraryItems = [] for (const libraryItemId of libraryItemIds) {