mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
New: Handle missingFiles status from qBit
(cherry picked from commit 9a2cee3104b1e8d32f2df68d3ca75967aba41868)
This commit is contained in:
parent
c6d49c6527
commit
0581ff458c
2 changed files with 26 additions and 0 deletions
|
@ -258,6 +258,27 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
||||||
item.RemainingTime.Should().NotHaveValue();
|
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]
|
[Test]
|
||||||
public void Download_should_return_unique_id()
|
public void Download_should_return_unique_id()
|
||||||
{
|
{
|
||||||
|
|
|
@ -182,6 +182,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||||
item.Message = "The download is stalled with no connections";
|
item.Message = "The download is stalled with no connections";
|
||||||
break;
|
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
|
case "metaDL": // torrent magnet is being downloaded
|
||||||
if (config.DhtEnabled)
|
if (config.DhtEnabled)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue