From 2b766300fff981c1e395ce4b70db8285e4820fb4 Mon Sep 17 00:00:00 2001 From: Flaminel Date: Wed, 26 Mar 2025 23:51:29 +0200 Subject: [PATCH] fixed processing files marked as skipped --- .../Verticals/DownloadClient/Deluge/DelugeService.cs | 6 ++++++ .../Verticals/DownloadClient/QBittorrent/QBitService.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeService.cs b/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeService.cs index b925f6a..532dee3 100644 --- a/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeService.cs +++ b/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeService.cs @@ -367,6 +367,12 @@ public class DelugeService : DownloadService, IDelugeService ProcessFiles(contents?.Contents, (_, file) => { string filePath = string.Join(Path.DirectorySeparatorChar, Path.Combine(download.DownloadLocation, file.Path).Split(['\\', '/'])); + + if (file.Priority <= 0) + { + _logger.LogDebug("skip | file is not downloaded | {file}", filePath); + return; + } long hardlinkCount = _hardLinkFileService.GetHardLinkCount(filePath, !string.IsNullOrEmpty(_downloadCleanerConfig.UnlinkedIgnoredRootDir)); diff --git a/code/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs b/code/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs index 795b3ae..91eaf4c 100644 --- a/code/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs +++ b/code/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs @@ -408,6 +408,12 @@ public class QBitService : DownloadService, IQBitService string filePath = string.Join(Path.DirectorySeparatorChar, Path.Combine(download.SavePath, file.Name).Split(['\\', '/'])); + if (file.Priority is TorrentContentPriority.Skip) + { + _logger.LogDebug("skip | file is not downloaded | {file}", filePath); + continue; + } + long hardlinkCount = _hardLinkFileService.GetHardLinkCount(filePath, !string.IsNullOrEmpty(_downloadCleanerConfig.UnlinkedIgnoredRootDir)); if (hardlinkCount < 0)