From 269ea5597ffc73ba23779d511289c4fd9e46e2e0 Mon Sep 17 00:00:00 2001 From: Stevie Robinson Date: Wed, 27 Sep 2023 19:21:44 +0200 Subject: [PATCH] Fixed: qBittorent history retention to allow at least 14 days seeding (cherry picked from commit 33b87acabf2b4c71ee24cda1a466dec6f4f76996) --- src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs index ec8861bdb..e111da7ca 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs @@ -378,11 +378,13 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } } + var minimumRetention = 60 * 24 * 14; + return new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost", OutputRootFolders = new List { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) }, - RemovesCompletedDownloads = (config.MaxRatioEnabled || config.MaxSeedingTimeEnabled) && (config.MaxRatioAction == QBittorrentMaxRatioAction.Remove || config.MaxRatioAction == QBittorrentMaxRatioAction.DeleteFiles) + RemovesCompletedDownloads = (config.MaxRatioEnabled || (config.MaxSeedingTimeEnabled && config.MaxSeedingTime < minimumRetention)) && (config.MaxRatioAction == QBittorrentMaxRatioAction.Remove || config.MaxRatioAction == QBittorrentMaxRatioAction.DeleteFiles) }; }