Skip to content

Commit

Permalink
Fixed: qBittorent history retention to allow at least 14 days seeding
Browse files Browse the repository at this point in the history
(cherry picked from commit 33b87acabf2b4c71ee24cda1a466dec6f4f76996)
  • Loading branch information
stevietv authored and mynameisbogdan committed Oct 1, 2023
1 parent ba5028b commit 6b9a622
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -378,11 +378,13 @@ public override DownloadClientInfo GetStatus()
}
}

var minimumRetention = 60 * 24 * 14;

return new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
OutputRootFolders = new List<OsPath> { _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)
};
}

Expand Down

0 comments on commit 6b9a622

Please sign in to comment.