Fixed: Allow files to be moved from Torrent Blackhole even when remove is disabled

(cherry picked from commit f739fd0900695e2ff312d13985c87d84ae00ea75)
This commit is contained in:
Mark McDowall 2024-11-14 19:01:38 -08:00 committed by servarr
commit 0fc25a3f9c
3 changed files with 9 additions and 8 deletions

View file

@ -123,7 +123,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
VerifyCompleted(result);
result.CanBeRemoved.Should().BeFalse();
result.CanBeRemoved.Should().BeTrue();
result.CanMoveFiles.Should().BeFalse();
}

View file

@ -102,9 +102,8 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
Status = item.Status
};
queueItem.CanMoveFiles = queueItem.CanBeRemoved =
queueItem.DownloadClientInfo.RemoveCompletedDownloads &&
!Settings.ReadOnly;
queueItem.CanMoveFiles = !Settings.ReadOnly;
queueItem.CanBeRemoved = queueItem.DownloadClientInfo.RemoveCompletedDownloads;
yield return queueItem;
}

View file

@ -57,7 +57,7 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
{
foreach (var item in _scanWatchFolder.GetItems(Settings.WatchFolder, ScanGracePeriod))
{
yield return new DownloadClientItem
var queueItem = new DownloadClientItem
{
DownloadClientInfo = DownloadClientItemClientInfo.FromDownloadClient(this, false),
DownloadId = Definition.Name + "_" + item.DownloadId,
@ -70,10 +70,12 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
OutputPath = item.OutputPath,
Status = item.Status,
CanBeRemoved = true,
CanMoveFiles = true
};
queueItem.CanMoveFiles = true;
queueItem.CanBeRemoved = queueItem.DownloadClientInfo.RemoveCompletedDownloads;
yield return queueItem;
}
}