Deluge torrents that don't have a hash are skipped

In some cases torrents in Deluge may not have a hash (ex: https://torguard.net/checkmytorrentipaddress.php). This causes Sonarr to fail when loading the torrents from Deluge with error message: 'Unable to communicate with deluge. Object reference not set to an instance of an object'. This commit simply causes Sonarr to skip over the torrent with the missing hash and continue loading torrents that do have hashes.
This commit is contained in:
Nicholas Landriault 2018-05-15 18:17:57 -04:00 committed by Taloth Saldono
parent 9c9ad9aec3
commit d7a054f637
1 changed files with 1 additions and 0 deletions

View File

@ -104,6 +104,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
foreach (var torrent in torrents)
{
if (torrent.Hash == null) continue;
var item = new DownloadClientItem();
item.DownloadId = torrent.Hash.ToUpper();
item.Title = torrent.Name;