mirror of
https://github.com/Readarr/Readarr
synced 2026-02-11 17:23:26 +01:00
New: Handle missingFiles status from qBit
Fixes #442 (cherry picked from commit 9a2cee3104b1e8d32f2df68d3ca75967aba41868)
This commit is contained in:
parent
39b2326bc5
commit
ca00b8a3c7
2 changed files with 26 additions and 0 deletions
|
|
@ -417,6 +417,27 @@ public void api_261_should_use_content_path()
|
|||
result.OutputPath.FullPath.Should().Be(torrent.ContentPath);
|
||||
}
|
||||
|
||||
[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 Download_should_return_unique_id()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -178,6 +178,11 @@ public override IEnumerable<DownloadClientItem> GetItems()
|
|||
item.Message = "The download is stalled with no connections";
|
||||
break;
|
||||
|
||||
case "missingFiles": // torrent is being downloaded, but no connection were made
|
||||
item.Status = DownloadItemStatus.Warning;
|
||||
item.Message = "The download is missing files";
|
||||
break;
|
||||
|
||||
case "metaDL": // torrent magnet is being downloaded
|
||||
if (config.DhtEnabled)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue