Fixed: Handle Flood reporting errors for completed and stopped downloads

(cherry picked from commit f2b2eb69a3e8b271535bd92dc2f5cbfd45664daf)
This commit is contained in:
Mark McDowall
2022-11-28 19:04:14 -08:00
committed by Qstick
parent aa2855a62b
commit a6a2219bc4

View File

@@ -125,22 +125,22 @@ namespace NzbDrone.Core.Download.Clients.Flood
item.RemainingTime = TimeSpan.FromSeconds(properties.Eta); item.RemainingTime = TimeSpan.FromSeconds(properties.Eta);
} }
if (properties.Status.Contains("error")) if (properties.Status.Contains("seeding") || properties.Status.Contains("complete"))
{
item.Status = DownloadItemStatus.Warning;
}
else if (properties.Status.Contains("seeding") || properties.Status.Contains("complete"))
{ {
item.Status = DownloadItemStatus.Completed; item.Status = DownloadItemStatus.Completed;
} }
else if (properties.Status.Contains("downloading"))
{
item.Status = DownloadItemStatus.Downloading;
}
else if (properties.Status.Contains("stopped")) else if (properties.Status.Contains("stopped"))
{ {
item.Status = DownloadItemStatus.Paused; item.Status = DownloadItemStatus.Paused;
} }
else if (properties.Status.Contains("error"))
{
item.Status = DownloadItemStatus.Warning;
}
else if (properties.Status.Contains("downloading"))
{
item.Status = DownloadItemStatus.Downloading;
}
if (item.Status == DownloadItemStatus.Completed) if (item.Status == DownloadItemStatus.Completed)
{ {