Improve stalled and failed imports (#37)

This commit is contained in:
Marius Nechifor
2025-01-13 13:18:58 +02:00
committed by GitHub
parent c7ad1c5ee6
commit f0dc51f10b
20 changed files with 204 additions and 38 deletions
@@ -57,11 +57,16 @@ public sealed class QueueCleaner : GenericHandler
continue;
}
bool shouldRemoveFromArr = arrClient.ShouldRemoveFromQueue(record);
bool shouldRemoveFromDownloadClient = _downloadClientConfig.DownloadClient is not Common.Enums.DownloadClient.None &&
await _downloadService.ShouldRemoveFromArrQueueAsync(record.DownloadId);
RemoveResult removeResult = new();
if (!shouldRemoveFromArr && !shouldRemoveFromDownloadClient)
if (_downloadClientConfig.DownloadClient is not Common.Enums.DownloadClient.None)
{
removeResult = await _downloadService.ShouldRemoveFromArrQueueAsync(record.DownloadId);
}
bool shouldRemoveFromArr = arrClient.ShouldRemoveFromQueue(record, removeResult.IsPrivate);
if (!shouldRemoveFromArr && !removeResult.ShouldRemove)
{
_logger.LogInformation("skip | {title}", record.Title);
continue;