Correcting download status when fetching metadata

This commit is contained in:
Benjamin Harder 2024-08-05 21:17:51 +02:00
parent b1527f9abb
commit 78dd7c33ee
2 changed files with 23 additions and 2 deletions

View File

@ -229,7 +229,6 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
[TestCase("queuedDL")]
[TestCase("checkingDL")]
[TestCase("checkingUP")]
[TestCase("metaDL")]
[TestCase("checkingResumeData")]
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();
}
[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]
public void downloading_item_should_have_required_properties()
{

View File

@ -287,7 +287,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
case "forcedMetaDL": // torrent metadata is being forcibly downloaded
if (config.DhtEnabled)
{
item.Status = DownloadItemStatus.Queued;
item.Status = DownloadItemStatus.Downloading;
item.Message = _localizationService.GetLocalizedString("DownloadClientQbittorrentTorrentStateMetadata");
}
else