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 <ta264@users.noreply.github.com>
pull/2626/head
servarr[bot] 3 years ago committed by GitHub
parent 6883356e28
commit 68bfc51116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save