fixed categories not being filtered when fetching downloads; fixed inconsistent var naming

This commit is contained in:
Flaminel
2025-02-22 02:27:48 +02:00
parent bd81f2ffca
commit c65c85a0c5
4 changed files with 22 additions and 17 deletions
@@ -65,18 +65,18 @@ public sealed class DownloadCleaner : GenericHandler
List<object>? downloadsToBeCleaned = await _downloadService.GetDownloadsToBeCleanedAsync(_config.Categories);
List<object>? downloadsToChangeCategory = null;
if (!string.IsNullOrEmpty(_config.NoHardlinksCategory) && _config.HardlinkCategories?.Count > 0)
if (!string.IsNullOrEmpty(_config.NoHardLinksCategory) && _config.NoHardLinksCategories?.Count > 0)
{
if (!_hardLinkCategoryCreated)
{
_logger.LogTrace("creating category {cat}", _config.NoHardlinksCategory);
_logger.LogTrace("creating category {cat}", _config.NoHardLinksCategory);
await _downloadService.CreateCategoryAsync(_config.NoHardlinksCategory);
await _downloadService.CreateCategoryAsync(_config.NoHardLinksCategory);
_hardLinkCategoryCreated = true;
}
_logger.LogTrace("getting downloads to change category");
downloadsToChangeCategory = await _downloadService.GetDownloadsToChangeCategoryAsync(_config.HardlinkCategories);
downloadsToChangeCategory = await _downloadService.GetDownloadsToChangeCategoryAsync(_config.NoHardLinksCategories);
}
bool hasDownloadsToClean = downloadsToBeCleaned?.Count > 0;