From d93d4f3236661eafac310ff4cec1318889017dd7 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 31 Jul 2022 14:00:17 -0500 Subject: [PATCH] Update:Auto-download new podcast episode check max failed attempts to 24 --- server/managers/PodcastManager.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/managers/PodcastManager.js b/server/managers/PodcastManager.js index e0c16585..b87c0bf0 100644 --- a/server/managers/PodcastManager.js +++ b/server/managers/PodcastManager.js @@ -24,7 +24,8 @@ class PodcastManager { this.currentDownload = null this.episodeScheduleTask = null - this.failedCheckMap = {} + this.failedCheckMap = {}, + this.MaxFailedEpisodeChecks = 24 } get serverSettings() { @@ -200,8 +201,8 @@ class PodcastManager { // Allow up to 3 failed attempts before disabling auto download if (!this.failedCheckMap[libraryItem.id]) this.failedCheckMap[libraryItem.id] = 0 this.failedCheckMap[libraryItem.id]++ - if (this.failedCheckMap[libraryItem.id] > 2) { - Logger.error(`[PodcastManager] checkForNewEpisodes 3 failed attempts at checking episodes for "${libraryItem.media.metadata.title}" - disabling auto download`) + if (this.failedCheckMap[libraryItem.id] >= this.MaxFailedEpisodeChecks) { + Logger.error(`[PodcastManager] checkForNewEpisodes ${this.failedCheckMap[libraryItem.id]} failed attempts at checking episodes for "${libraryItem.media.metadata.title}" - disabling auto download`) libraryItem.media.autoDownloadEpisodes = false delete this.failedCheckMap[libraryItem.id] } else {