From 17cfaf170e56c80a4e0f1ec2a691b2e3513362c7 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 9 Mar 2018 13:51:52 -0800 Subject: [PATCH] Add missing error check when adding a magnet link to deluge (#2295) * Add missing error check when adding a magnet link to deluge * Fix typo. --- src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs index b142aa1d8..3b52f9570 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs @@ -35,6 +35,11 @@ namespace NzbDrone.Core.Download.Clients.Deluge { var actualHash = _proxy.AddTorrentFromMagnet(magnetLink, Settings); + if (actualHash.IsNullOrWhiteSpace()) + { + throw new DownloadClientException("Deluge failed to add magnet " + magnetLink); + } + if (!Settings.TvCategory.IsNullOrWhiteSpace()) { _proxy.SetLabel(actualHash, Settings.TvCategory, Settings);