From 4f281669fcd460efa4191590de31da12c7e4271d Mon Sep 17 00:00:00 2001 From: ta264 Date: Tue, 1 Dec 2020 21:20:21 +0000 Subject: [PATCH] Fixed: Use QBittorrent category savepath for healthcheck [common] --- .../Clients/QBittorrent/QBittorrent.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs index d8de6d871..6011608a1 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs @@ -269,10 +269,30 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent public override DownloadClientInfo GetStatus() { + var version = Proxy.GetApiVersion(Settings); var config = Proxy.GetConfig(Settings); 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 { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",