From 89a6eaf0ce3c49ccc1188bb4c4369ba3a35d9bd5 Mon Sep 17 00:00:00 2001 From: Flaminel Date: Mon, 10 Mar 2025 00:13:40 +0200 Subject: [PATCH] Disable cleanup on torrent items if download client is not configured (#85) --- .../Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs b/code/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs index 561b38c..e422a5c 100644 --- a/code/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs +++ b/code/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs @@ -92,8 +92,14 @@ public sealed class QueueCleaner : GenericHandler StalledResult stalledCheckResult = new(); - if (_downloadClientConfig.DownloadClient is not Common.Enums.DownloadClient.None && record.Protocol is "torrent") + if (record.Protocol is "torrent") { + if (_downloadClientConfig.DownloadClient is Common.Enums.DownloadClient.None) + { + _logger.LogWarning("skip | download client is not configured | {title}", record.Title); + continue; + } + // stalled download check stalledCheckResult = await _downloadService.ShouldRemoveFromArrQueueAsync(record.DownloadId, ignoredDownloads); }