mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
And added a test for it.
This commit is contained in:
@@ -371,5 +371,16 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
|||||||
|
|
||||||
Subject.Test();
|
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 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
|||||||
item.OutputPath = outputPath + torrent.Name;
|
item.OutputPath = outputPath + torrent.Name;
|
||||||
item.TotalSize = torrent.TotalSize;
|
item.TotalSize = torrent.TotalSize;
|
||||||
item.RemainingSize = torrent.LeftUntilDone;
|
item.RemainingSize = torrent.LeftUntilDone;
|
||||||
if (torrent.Eta != -1)
|
if (torrent.Eta >= 0)
|
||||||
{
|
{
|
||||||
item.RemainingTime = TimeSpan.FromSeconds(torrent.Eta);
|
item.RemainingTime = TimeSpan.FromSeconds(torrent.Eta);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user