Fixed: Handle Flood reporting errors for completed and stopped downloads

Closes #5224
This commit is contained in:
Mark McDowall 2022-11-28 19:04:14 -08:00
parent 4c7df31070
commit f2b2eb69a3
1 changed files with 9 additions and 9 deletions

View File

@ -132,22 +132,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)
{ {