mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-03 05:25:10 +00:00
Fixed: Allow files to be moved from Torrent Blackhole even when remove is disabled
(cherry picked from commit f739fd0900695e2ff312d13985c87d84ae00ea75)
This commit is contained in:
parent
8d32a532e4
commit
abe0090f94
3 changed files with 9 additions and 8 deletions
|
@ -123,7 +123,7 @@ public void completed_download_should_have_required_properties()
|
||||||
|
|
||||||
VerifyCompleted(result);
|
VerifyCompleted(result);
|
||||||
|
|
||||||
result.CanBeRemoved.Should().BeFalse();
|
result.CanBeRemoved.Should().BeTrue();
|
||||||
result.CanMoveFiles.Should().BeFalse();
|
result.CanMoveFiles.Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,9 +102,8 @@ public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
Status = item.Status
|
Status = item.Status
|
||||||
};
|
};
|
||||||
|
|
||||||
queueItem.CanMoveFiles = queueItem.CanBeRemoved =
|
queueItem.CanMoveFiles = !Settings.ReadOnly;
|
||||||
queueItem.DownloadClientInfo.RemoveCompletedDownloads &&
|
queueItem.CanBeRemoved = queueItem.DownloadClientInfo.RemoveCompletedDownloads;
|
||||||
!Settings.ReadOnly;
|
|
||||||
|
|
||||||
yield return queueItem;
|
yield return queueItem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
foreach (var item in _scanWatchFolder.GetItems(Settings.WatchFolder, ScanGracePeriod))
|
foreach (var item in _scanWatchFolder.GetItems(Settings.WatchFolder, ScanGracePeriod))
|
||||||
{
|
{
|
||||||
yield return new DownloadClientItem
|
var queueItem = new DownloadClientItem
|
||||||
{
|
{
|
||||||
DownloadClientInfo = DownloadClientItemClientInfo.FromDownloadClient(this, false),
|
DownloadClientInfo = DownloadClientItemClientInfo.FromDownloadClient(this, false),
|
||||||
DownloadId = Definition.Name + "_" + item.DownloadId,
|
DownloadId = Definition.Name + "_" + item.DownloadId,
|
||||||
|
@ -70,10 +70,12 @@ public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
OutputPath = item.OutputPath,
|
OutputPath = item.OutputPath,
|
||||||
|
|
||||||
Status = item.Status,
|
Status = item.Status,
|
||||||
|
|
||||||
CanBeRemoved = true,
|
|
||||||
CanMoveFiles = true
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
queueItem.CanMoveFiles = true;
|
||||||
|
queueItem.CanBeRemoved = queueItem.DownloadClientInfo.RemoveCompletedDownloads;
|
||||||
|
|
||||||
|
yield return queueItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue