Fixed: Heavy qbit api load when CDH Remove is disabled and Seeding time has been reached

ref #3108
This commit is contained in:
Taloth Saldono
2019-07-14 11:34:03 +02:00
committed by Qstick
parent 747ed0af84
commit ce1da8665f
2 changed files with 83 additions and 14 deletions
@@ -558,6 +558,22 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
item.CanMoveFiles.Should().BeTrue();
}
[Test]
public void should_not_fetch_details_twice()
{
GivenGlobalSeedLimits(-1, 30);
GivenCompletedTorrent("pausedUP", ratio: 2.0f, seedingTime: 20);
var item = Subject.GetItems().Single();
item.CanBeRemoved.Should().BeFalse();
item.CanMoveFiles.Should().BeFalse();
var item2 = Subject.GetItems().Single();
Mocker.GetMock<IQBittorrentProxy>()
.Verify(p => p.GetTorrentProperties(It.IsAny<string>(), It.IsAny<QBittorrentSettings>()), Times.Once());
}
[Test]
public void should_get_category_from_the_category_if_set()
{