Add health check for dl clients removing completed downloads + enable for sab and qbit

(cherry picked from commit 7f2cd8a0e99b537a1c616998514bacdd8468a016)

Closes #2939
This commit is contained in:
Stevie Robinson
2023-09-12 00:19:44 +02:00
committed by Bogdan
parent b209d047fa
commit 44e6de2e23
7 changed files with 149 additions and 1 deletions
@@ -389,7 +389,8 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
return new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) }
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) },
RemovesCompletedDownloads = (config.MaxRatioEnabled || config.MaxSeedingTimeEnabled) && (config.MaxRatioAction == QBittorrentMaxRatioAction.Remove || config.MaxRatioAction == QBittorrentMaxRatioAction.DeleteFiles)
};
}
@@ -263,6 +263,8 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
status.OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, category.FullPath) };
}
status.RemovesCompletedDownloads = config.Misc.history_retention != "0";
return status;
}
@@ -29,6 +29,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
public string[] date_categories { get; set; }
public bool enable_date_sorting { get; set; }
public bool pre_check { get; set; }
public string history_retention { get; set; }
}
public class SabnzbdCategory
@@ -11,6 +11,7 @@ namespace NzbDrone.Core.Download
}
public bool IsLocalhost { get; set; }
public bool RemovesCompletedDownloads { get; set; }
public List<OsPath> OutputRootFolders { get; set; }
}
}