mirror of
https://github.com/Radarr/Radarr
synced 2025-02-25 15:43:08 +00:00
New: Treat Manual Bad in history as failed
(cherry picked from commit ab478fd64bdf2b710fb865006858a1a7dbdbad21)
This commit is contained in:
parent
638db3d8d7
commit
25c0ed1cd0
2 changed files with 32 additions and 0 deletions
|
@ -424,6 +424,31 @@ public void should_use_dest_dir_if_final_dir_is_not_set()
|
||||||
Subject.GetItems().First().OutputPath.Should().Be(_completed.DestDir);
|
Subject.GetItems().First().OutputPath.Should().Be(_completed.DestDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_report_deletestatus_manual_with_markstatus_bad_as_failed()
|
||||||
|
{
|
||||||
|
_completed.DeleteStatus = "MANUAL";
|
||||||
|
_completed.MarkStatus = "BAD";
|
||||||
|
|
||||||
|
GivenQueue(null);
|
||||||
|
GivenHistory(_completed);
|
||||||
|
|
||||||
|
var result = Subject.GetItems().Single();
|
||||||
|
|
||||||
|
result.Status.Should().Be(DownloadItemStatus.Failed);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_ignore_deletestatus_manual_without_markstatus()
|
||||||
|
{
|
||||||
|
_completed.DeleteStatus = "MANUAL";
|
||||||
|
|
||||||
|
GivenQueue(null);
|
||||||
|
GivenHistory(_completed);
|
||||||
|
|
||||||
|
Subject.GetItems().Should().BeEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_use_final_dir_when_set_instead_of_dest_dir()
|
public void should_use_final_dir_when_set_instead_of_dest_dir()
|
||||||
{
|
{
|
||||||
|
|
|
@ -136,6 +136,13 @@ private IEnumerable<DownloadClientItem> GetHistory()
|
||||||
|
|
||||||
if (item.DeleteStatus == "MANUAL")
|
if (item.DeleteStatus == "MANUAL")
|
||||||
{
|
{
|
||||||
|
if (item.MarkStatus == "BAD")
|
||||||
|
{
|
||||||
|
historyItem.Status = DownloadItemStatus.Failed;
|
||||||
|
|
||||||
|
historyItems.Add(historyItem);
|
||||||
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue