From c86e9c97b871580e24b70a970f9d187fd26a39cb Mon Sep 17 00:00:00 2001 From: Flaminel Date: Tue, 25 Mar 2025 16:21:31 +0200 Subject: [PATCH] removed commented and unused code --- .../Verticals/DownloadClient/Deluge/DelugeClient.cs | 2 +- .../Verticals/DownloadClient/Deluge/DelugeService.cs | 3 --- .../Verticals/DownloadClient/QBittorrent/QBitService.cs | 6 +----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeClient.cs b/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeClient.cs index c206751..3406910 100644 --- a/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeClient.cs +++ b/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeClient.cs @@ -147,7 +147,7 @@ public sealed class DelugeClient return responseJson; } - private DelugeRequest CreateRequest(string method, params object[] parameters) + private static DelugeRequest CreateRequest(string method, params object[] parameters) { if (String.IsNullOrWhiteSpace(method)) { diff --git a/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeService.cs b/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeService.cs index 5bd5b76..66f32c5 100644 --- a/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeService.cs +++ b/code/Infrastructure/Verticals/DownloadClient/Deluge/DelugeService.cs @@ -126,9 +126,6 @@ public class DelugeService : DownloadService, IDelugeService return result; } - var ceva = await _client.GetTorrentExtended(hash); - - if (ignoredDownloads.Count > 0 && download.ShouldIgnore(ignoredDownloads)) { _logger.LogInformation("skip | download is ignored | {name}", download.Name); diff --git a/code/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs b/code/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs index 784472b..65b5adb 100644 --- a/code/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs +++ b/code/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs @@ -406,11 +406,7 @@ public class QBitService : DownloadService, IQBitService break; } - // string filePath = Path.Combine(Directory.Exists(download.ContentPath) - // ? download.ContentPath - // : download.SavePath, file.Name - // ); - string filePath = string.Join(Path.DirectorySeparatorChar, Path.Combine(download.SavePath, file.Name).Split(['\\', '/'])); // TODO + string filePath = string.Join(Path.DirectorySeparatorChar, Path.Combine(download.SavePath, file.Name).Split(['\\', '/'])); long hardlinkCount = _hardLinkFileService.GetHardLinkCount(filePath, !string.IsNullOrEmpty(_downloadCleanerConfig.UnlinkedIgnoredRootDir));