New: Handle missingFiles status from qBit

This commit is contained in:
bakerboy448 2021-11-26 21:49:24 -06:00 committed by GitHub
parent ded3f59d2f
commit 7b7da9c1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View File

@ -285,6 +285,27 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
item.RemainingTime.Should().NotHaveValue();
}
[Test]
public void missingFiles_item_should_have_required_properties()
{
var torrent = new QBittorrentTorrent
{
Hash = "HASH",
Name = _title,
Size = 1000,
Progress = 0.7,
Eta = 8640000,
State = "missingFiles",
Label = "",
SavePath = ""
};
GivenTorrents(new List<QBittorrentTorrent> { torrent });
var item = Subject.GetItems().Single();
VerifyWarning(item);
item.RemainingTime.Should().NotHaveValue();
}
[Test]
public void single_file_torrent_outputpath_should_have_sanitised_name()
{

View File

@ -269,6 +269,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
item.Message = "The download is stalled with no connections";
break;
case "missingFiles": // torrent is missing files
item.Status = DownloadItemStatus.Warning;
item.Message = "The download is missing files";
break;
case "metaDL": // torrent magnet is being downloaded
if (config.DhtEnabled)
{