#205: retry for deleted downloads too

Commands “Retry failed articles” and “Download remaining files“ now
work for deleted downloads too (including deleted by health check).
This commit is contained in:
Andrey Prygunkov
2016-05-09 19:17:17 +02:00
parent 7c2cac135d
commit f08d3918dc
12 changed files with 279 additions and 186 deletions

View File

@@ -768,6 +768,7 @@ bool QueueEditor::EditGroup(NzbInfo* nzbInfo, DownloadQueue::EEditAction action,
if (action == DownloadQueue::eaGroupDelete || action == DownloadQueue::eaGroupDupeDelete || action == DownloadQueue::eaGroupFinalDelete)
{
nzbInfo->SetDeleting(true);
nzbInfo->SetParking(action == DownloadQueue::eaGroupDelete && CanPark(nzbInfo));
nzbInfo->SetAvoidHistory(action == DownloadQueue::eaGroupFinalDelete);
nzbInfo->SetDeletePaused(allPaused);
if (action == DownloadQueue::eaGroupDupeDelete)
@@ -1051,6 +1052,15 @@ bool QueueEditor::CanCleanupDisk(NzbInfo* nzbInfo)
return false;
}
bool QueueEditor::CanPark(NzbInfo* nzbInfo)
{
bool park = !g_Options->GetDeleteCleanupDisk() && g_Options->GetKeepHistory() > 0 &&
!nzbInfo->GetUnpackCleanedUpDisk() &&
(nzbInfo->GetSuccessArticles() > 0 || nzbInfo->GetFailedArticles() > 0);
return park;
}
bool QueueEditor::MergeGroups(ItemList* itemList)
{
if (itemList->size() == 0)