From 68bfc51116833d07cbd94c605e846f3e6545446c Mon Sep 17 00:00:00 2001 From: "servarr[bot]" <68984020+servarr[bot]@users.noreply.github.com> Date: Tue, 25 Jan 2022 19:02:44 +0000 Subject: [PATCH] Fixed: Handle missing category when getting Qbittorrent download path Fixes LIDARR-24B Fixes LIDARR-2PM Fixes LIDARR-55T (cherry picked from commit 6f97ca9a55471386454457ca52b93733e18e85e4) Co-authored-by: ta264 --- src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs index 50b19fa55..207b7acc1 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs @@ -366,9 +366,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent if (Settings.MusicCategory.IsNotNullOrWhiteSpace() && version >= Version.Parse("2.0")) { - var label = Proxy.GetLabels(Settings)[Settings.MusicCategory]; - - if (label.SavePath.IsNotNullOrWhiteSpace()) + if (Proxy.GetLabels(Settings).TryGetValue(Settings.MusicCategory, out var label) && label.SavePath.IsNotNullOrWhiteSpace()) { var labelDir = new OsPath(label.SavePath);