Correcting download status when fetching metadata
This commit is contained in:
parent
b1527f9abb
commit
78dd7c33ee
|
@ -229,7 +229,6 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
||||||
[TestCase("queuedDL")]
|
[TestCase("queuedDL")]
|
||||||
[TestCase("checkingDL")]
|
[TestCase("checkingDL")]
|
||||||
[TestCase("checkingUP")]
|
[TestCase("checkingUP")]
|
||||||
[TestCase("metaDL")]
|
|
||||||
[TestCase("checkingResumeData")]
|
[TestCase("checkingResumeData")]
|
||||||
public void queued_item_should_have_required_properties(string state)
|
public void queued_item_should_have_required_properties(string state)
|
||||||
{
|
{
|
||||||
|
@ -251,6 +250,28 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
||||||
item.RemainingTime.Should().NotHaveValue();
|
item.RemainingTime.Should().NotHaveValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestCase("metaDL")]
|
||||||
|
[TestCase("forcedMetaDL")]
|
||||||
|
public void metaDL_item_should_have_required_properties(string state)
|
||||||
|
{
|
||||||
|
var torrent = new QBittorrentTorrent
|
||||||
|
{
|
||||||
|
Hash = "HASH",
|
||||||
|
Name = _title,
|
||||||
|
Size = 1000,
|
||||||
|
Progress = 0.0,
|
||||||
|
Eta = 8640000,
|
||||||
|
State = state,
|
||||||
|
Label = "",
|
||||||
|
SavePath = ""
|
||||||
|
};
|
||||||
|
GivenTorrents(new List<QBittorrentTorrent> { torrent });
|
||||||
|
|
||||||
|
var item = Subject.GetItems().Single();
|
||||||
|
VerifyDownloading(item);
|
||||||
|
item.RemainingTime.Should().NotHaveValue();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void downloading_item_should_have_required_properties()
|
public void downloading_item_should_have_required_properties()
|
||||||
{
|
{
|
||||||
|
|
|
@ -287,7 +287,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||||
case "forcedMetaDL": // torrent metadata is being forcibly downloaded
|
case "forcedMetaDL": // torrent metadata is being forcibly downloaded
|
||||||
if (config.DhtEnabled)
|
if (config.DhtEnabled)
|
||||||
{
|
{
|
||||||
item.Status = DownloadItemStatus.Queued;
|
item.Status = DownloadItemStatus.Downloading;
|
||||||
item.Message = _localizationService.GetLocalizedString("DownloadClientQbittorrentTorrentStateMetadata");
|
item.Message = _localizationService.GetLocalizedString("DownloadClientQbittorrentTorrentStateMetadata");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue