diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs index 93dca86cc7..3f6abf02d0 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs @@ -258,6 +258,27 @@ public void stalledDL_item_should_have_required_properties() 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 { torrent }); + + var item = Subject.GetItems().Single(); + VerifyWarning(item); + item.RemainingTime.Should().NotHaveValue(); + } + [Test] public void Download_should_return_unique_id() { diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs index c20bbf0a71..8ec9d0f897 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs @@ -182,6 +182,11 @@ public override IEnumerable 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) {