1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Use QBittorrent category savepath for healthcheck

[common]
This commit is contained in:
ta264 2020-12-01 21:20:21 +00:00 committed by Qstick
parent 9fbedc32ed
commit 4f281669fc

View File

@ -269,10 +269,30 @@ public override DownloadClientItem GetImportItem(DownloadClientItem item, Downlo
public override DownloadClientInfo GetStatus() public override DownloadClientInfo GetStatus()
{ {
var version = Proxy.GetApiVersion(Settings);
var config = Proxy.GetConfig(Settings); var config = Proxy.GetConfig(Settings);
var destDir = new OsPath(config.SavePath); var destDir = new OsPath(config.SavePath);
if (Settings.MovieCategory.IsNotNullOrWhiteSpace() && version >= Version.Parse("2.0"))
{
var label = Proxy.GetLabels(Settings)[Settings.MovieCategory];
if (label.SavePath.IsNotNullOrWhiteSpace())
{
var labelDir = new OsPath(label.SavePath);
if (labelDir.IsRooted)
{
destDir = labelDir;
}
else
{
destDir = destDir + labelDir;
}
}
}
return new DownloadClientInfo return new DownloadClientInfo
{ {
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost", IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",