mirror of
https://github.com/Readarr/Readarr
synced 2026-05-08 21:13:58 +02:00
Fixed: Sonarr not importing torrents in Vuze if the torrent already finished seeding and was stopped.
This commit is contained in:
parent
f67d748da1
commit
7f882ee425
2 changed files with 14 additions and 6 deletions
|
|
@ -13,6 +13,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class VuzeFixture : TransmissionFixtureBase<Vuze>
|
public class VuzeFixture : TransmissionFixtureBase<Vuze>
|
||||||
{
|
{
|
||||||
|
[SetUp]
|
||||||
|
public void Setup_Vuze()
|
||||||
|
{
|
||||||
|
// Vuze never sets isFinished.
|
||||||
|
_completed.IsFinished = false;
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void queued_item_should_have_required_properties()
|
public void queued_item_should_have_required_properties()
|
||||||
{
|
{
|
||||||
|
|
@ -150,8 +157,8 @@ public void Download_should_get_hash_from_magnet_url(string magnetUrl, string ex
|
||||||
[TestCase(TransmissionTorrentStatus.Check, DownloadItemStatus.Downloading)]
|
[TestCase(TransmissionTorrentStatus.Check, DownloadItemStatus.Downloading)]
|
||||||
[TestCase(TransmissionTorrentStatus.Queued, DownloadItemStatus.Queued)]
|
[TestCase(TransmissionTorrentStatus.Queued, DownloadItemStatus.Queued)]
|
||||||
[TestCase(TransmissionTorrentStatus.Downloading, DownloadItemStatus.Downloading)]
|
[TestCase(TransmissionTorrentStatus.Downloading, DownloadItemStatus.Downloading)]
|
||||||
[TestCase(TransmissionTorrentStatus.SeedingWait, DownloadItemStatus.Completed)]
|
[TestCase(TransmissionTorrentStatus.SeedingWait, DownloadItemStatus.Downloading)]
|
||||||
[TestCase(TransmissionTorrentStatus.Seeding, DownloadItemStatus.Completed)]
|
[TestCase(TransmissionTorrentStatus.Seeding, DownloadItemStatus.Downloading)]
|
||||||
public void GetItems_should_return_queued_item_as_downloadItemStatus(TransmissionTorrentStatus apiStatus, DownloadItemStatus expectedItemStatus)
|
public void GetItems_should_return_queued_item_as_downloadItemStatus(TransmissionTorrentStatus apiStatus, DownloadItemStatus expectedItemStatus)
|
||||||
{
|
{
|
||||||
_queued.Status = apiStatus;
|
_queued.Status = apiStatus;
|
||||||
|
|
@ -165,7 +172,7 @@ public void GetItems_should_return_queued_item_as_downloadItemStatus(Transmissio
|
||||||
|
|
||||||
[TestCase(TransmissionTorrentStatus.Queued, DownloadItemStatus.Queued)]
|
[TestCase(TransmissionTorrentStatus.Queued, DownloadItemStatus.Queued)]
|
||||||
[TestCase(TransmissionTorrentStatus.Downloading, DownloadItemStatus.Downloading)]
|
[TestCase(TransmissionTorrentStatus.Downloading, DownloadItemStatus.Downloading)]
|
||||||
[TestCase(TransmissionTorrentStatus.Seeding, DownloadItemStatus.Completed)]
|
[TestCase(TransmissionTorrentStatus.Seeding, DownloadItemStatus.Downloading)]
|
||||||
public void GetItems_should_return_downloading_item_as_downloadItemStatus(TransmissionTorrentStatus apiStatus, DownloadItemStatus expectedItemStatus)
|
public void GetItems_should_return_downloading_item_as_downloadItemStatus(TransmissionTorrentStatus apiStatus, DownloadItemStatus expectedItemStatus)
|
||||||
{
|
{
|
||||||
_downloading.Status = apiStatus;
|
_downloading.Status = apiStatus;
|
||||||
|
|
@ -180,7 +187,7 @@ public void GetItems_should_return_downloading_item_as_downloadItemStatus(Transm
|
||||||
[TestCase(TransmissionTorrentStatus.Stopped, DownloadItemStatus.Completed, true)]
|
[TestCase(TransmissionTorrentStatus.Stopped, DownloadItemStatus.Completed, true)]
|
||||||
[TestCase(TransmissionTorrentStatus.CheckWait, DownloadItemStatus.Downloading, false)]
|
[TestCase(TransmissionTorrentStatus.CheckWait, DownloadItemStatus.Downloading, false)]
|
||||||
[TestCase(TransmissionTorrentStatus.Check, DownloadItemStatus.Downloading, false)]
|
[TestCase(TransmissionTorrentStatus.Check, DownloadItemStatus.Downloading, false)]
|
||||||
[TestCase(TransmissionTorrentStatus.Queued, DownloadItemStatus.Completed, false)]
|
[TestCase(TransmissionTorrentStatus.Queued, DownloadItemStatus.Queued, false)]
|
||||||
[TestCase(TransmissionTorrentStatus.SeedingWait, DownloadItemStatus.Completed, false)]
|
[TestCase(TransmissionTorrentStatus.SeedingWait, DownloadItemStatus.Completed, false)]
|
||||||
[TestCase(TransmissionTorrentStatus.Seeding, DownloadItemStatus.Completed, false)]
|
[TestCase(TransmissionTorrentStatus.Seeding, DownloadItemStatus.Completed, false)]
|
||||||
public void GetItems_should_return_completed_item_as_downloadItemStatus(TransmissionTorrentStatus apiStatus, DownloadItemStatus expectedItemStatus, bool expectedValue)
|
public void GetItems_should_return_completed_item_as_downloadItemStatus(TransmissionTorrentStatus apiStatus, DownloadItemStatus expectedItemStatus, bool expectedValue)
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,9 @@ public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
item.Status = DownloadItemStatus.Warning;
|
item.Status = DownloadItemStatus.Warning;
|
||||||
item.Message = torrent.ErrorString;
|
item.Message = torrent.ErrorString;
|
||||||
}
|
}
|
||||||
else if (torrent.Status == TransmissionTorrentStatus.Seeding ||
|
else if (torrent.LeftUntilDone == 0 && (torrent.Status == TransmissionTorrentStatus.Stopped ||
|
||||||
torrent.Status == TransmissionTorrentStatus.SeedingWait)
|
torrent.Status == TransmissionTorrentStatus.Seeding ||
|
||||||
|
torrent.Status == TransmissionTorrentStatus.SeedingWait))
|
||||||
{
|
{
|
||||||
item.Status = DownloadItemStatus.Completed;
|
item.Status = DownloadItemStatus.Completed;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue