|
|
|
@ -388,7 +388,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var minimumRetention = 60 * 24 * 14;
|
|
|
|
|
var minimumRetention = GetMinimumRetention();
|
|
|
|
|
|
|
|
|
|
return new DownloadClientInfo
|
|
|
|
|
{
|
|
|
|
@ -398,6 +398,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int GetMinimumRetention()
|
|
|
|
|
{
|
|
|
|
|
return 60 * 24 * 14; // 14 days in minutes
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Test(List<ValidationFailure> failures)
|
|
|
|
|
{
|
|
|
|
|
failures.AddIfNotNull(TestConnection());
|
|
|
|
@ -448,7 +453,8 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|
|
|
|
|
|
|
|
|
// Complain if qBittorrent is configured to remove torrents on max ratio
|
|
|
|
|
var config = Proxy.GetConfig(Settings);
|
|
|
|
|
if ((config.MaxRatioEnabled || config.MaxSeedingTimeEnabled) && (config.MaxRatioAction == QBittorrentMaxRatioAction.Remove || config.MaxRatioAction == QBittorrentMaxRatioAction.DeleteFiles))
|
|
|
|
|
var minimumRetention = GetMinimumRetention();
|
|
|
|
|
if ((config.MaxRatioEnabled || (config.MaxSeedingTimeEnabled && config.MaxSeedingTime < minimumRetention)) && (config.MaxRatioAction == QBittorrentMaxRatioAction.Remove || config.MaxRatioAction == QBittorrentMaxRatioAction.DeleteFiles))
|
|
|
|
|
{
|
|
|
|
|
return new NzbDroneValidationFailure(string.Empty, _localizationService.GetLocalizedString("DownloadClientQbittorrentValidationRemovesAtRatioLimit"))
|
|
|
|
|
{
|
|
|
|
|