mirror of
https://github.com/Radarr/Radarr
synced 2025-02-27 08:33:21 +00:00
And added a test for it.
This commit is contained in:
parent
1cc6ad0d5f
commit
a1ff7cbef0
2 changed files with 12 additions and 1 deletions
|
@ -371,5 +371,16 @@ public void should_version_should_only_check_version_number(String version)
|
|||
|
||||
Subject.Test();
|
||||
}
|
||||
|
||||
[TestCase(-1)] // Infinite/Unknown
|
||||
[TestCase(-2)] // Magnet Downloading
|
||||
public void should_ignore_negative_eta(int eta)
|
||||
{
|
||||
_completed.Eta = eta;
|
||||
|
||||
PrepareClientToReturnCompletedItem();
|
||||
var item = Subject.GetItems().Single();
|
||||
item.RemainingTime.Should().NotHaveValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ public override IEnumerable<DownloadClientItem> GetItems()
|
|||
item.OutputPath = outputPath + torrent.Name;
|
||||
item.TotalSize = torrent.TotalSize;
|
||||
item.RemainingSize = torrent.LeftUntilDone;
|
||||
if (torrent.Eta != -1)
|
||||
if (torrent.Eta >= 0)
|
||||
{
|
||||
item.RemainingTime = TimeSpan.FromSeconds(torrent.Eta);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue