From 5dced28228e0350cbfbf8ba117a35b6e566e593f Mon Sep 17 00:00:00 2001 From: Flaminel Date: Mon, 24 Feb 2025 12:43:06 +0200 Subject: [PATCH] fixed errors on download cleaner when download client is none (#67) --- .../Verticals/DownloadCleaner/DownloadCleaner.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/Infrastructure/Verticals/DownloadCleaner/DownloadCleaner.cs b/code/Infrastructure/Verticals/DownloadCleaner/DownloadCleaner.cs index d18938b..2732694 100644 --- a/code/Infrastructure/Verticals/DownloadCleaner/DownloadCleaner.cs +++ b/code/Infrastructure/Verticals/DownloadCleaner/DownloadCleaner.cs @@ -46,6 +46,12 @@ public sealed class DownloadCleaner : GenericHandler public override async Task ExecuteAsync() { + if (_downloadClientConfig.DownloadClient is Common.Enums.DownloadClient.None) + { + _logger.LogWarning("download client is set to none"); + return; + } + if (_config.Categories?.Count is null or 0) { _logger.LogWarning("no categories configured");