1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 04:22:30 +01:00

Failed DeleteStatus now only a Warning, also added null check to handle older NzbGet version.

This commit is contained in:
Taloth Saldono 2015-03-22 21:42:55 +01:00
parent 971e159fa4
commit db4746bef7
2 changed files with 19 additions and 1 deletions

View File

@ -213,6 +213,19 @@ public void should_report_deletestatus_health_as_failed()
result.Status.Should().Be(DownloadItemStatus.Failed); result.Status.Should().Be(DownloadItemStatus.Failed);
} }
[Test]
public void should_report_deletestatus_dupe_as_warning()
{
_completed.DeleteStatus = "DUPE";
GivenQueue(null);
GivenHistory(_completed);
var result = Subject.GetItems().Single();
result.Status.Should().Be(DownloadItemStatus.Warning);
}
[Test] [Test]
public void should_report_unpackstatus_freespace_as_warning() public void should_report_unpackstatus_freespace_as_warning()
{ {

View File

@ -167,7 +167,12 @@ private IEnumerable<DownloadClientItem> GetHistory()
historyItem.Status = DownloadItemStatus.Failed; historyItem.Status = DownloadItemStatus.Failed;
} }
if (!successStatus.Contains(item.DeleteStatus)) if (!successStatus.Contains(item.DeleteStatus) && item.DeleteStatus.IsNotNullOrWhiteSpace())
{
historyItem.Status = DownloadItemStatus.Warning;
}
if (item.DeleteStatus == "HEALTH")
{ {
historyItem.Status = DownloadItemStatus.Failed; historyItem.Status = DownloadItemStatus.Failed;
} }