mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Fixed: Skip torrents in Deluge api that don't have hashes
This commit is contained in:
parent
d2d6f22c5f
commit
274df2f1ed
2 changed files with 20 additions and 0 deletions
|
@ -290,6 +290,24 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||||
item.CanBeRemoved.Should().Be(canBeRemoved);
|
item.CanBeRemoved.Should().Be(canBeRemoved);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetItems_should_ignore_items_without_hash()
|
||||||
|
{
|
||||||
|
_downloading.Hash = null;
|
||||||
|
|
||||||
|
GivenTorrents(new List<DelugeTorrent>
|
||||||
|
{
|
||||||
|
_downloading,
|
||||||
|
_queued
|
||||||
|
});
|
||||||
|
|
||||||
|
var items = Subject.GetItems().ToList();
|
||||||
|
|
||||||
|
items.Should().HaveCount(1);
|
||||||
|
|
||||||
|
items.First().Status.Should().Be(DownloadItemStatus.Queued);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_status_with_outputdirs()
|
public void should_return_status_with_outputdirs()
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,6 +104,8 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
||||||
|
|
||||||
foreach (var torrent in torrents)
|
foreach (var torrent in torrents)
|
||||||
{
|
{
|
||||||
|
if (torrent.Hash == null) continue;
|
||||||
|
|
||||||
var item = new DownloadClientItem();
|
var item = new DownloadClientItem();
|
||||||
item.DownloadId = torrent.Hash.ToUpper();
|
item.DownloadId = torrent.Hash.ToUpper();
|
||||||
item.Title = torrent.Name;
|
item.Title = torrent.Name;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue