Added: Missing error check when adding a magnet link to deluge

This commit is contained in:
Qstick 2018-03-14 21:39:37 -04:00
parent 4bb0735565
commit 97d4063cf3

View file

@ -35,6 +35,11 @@ protected override string AddFromMagnetLink(RemoteAlbum remoteAlbum, string hash
{
var actualHash = _proxy.AddTorrentFromMagnet(magnetLink, Settings);
if (actualHash.IsNullOrWhiteSpace())
{
throw new DownloadClientException("Deluge failed to add magnet " + magnetLink);
}
if (!Settings.MusicCategory.IsNullOrWhiteSpace())
{
_proxy.SetLabel(actualHash, Settings.MusicCategory, Settings);