Fixed: Stop downloads requiring manual import from being stuck as Downloaded

This commit is contained in:
ta264 2022-03-31 21:07:40 +01:00
parent 0f87cb72e5
commit b9e780d41c
2 changed files with 11 additions and 0 deletions

View File

@ -82,6 +82,11 @@ namespace NzbDrone.Core.Datastore.Migration
downloadHistoryData.Add("downloadClient", data["downloadClient"]);
}
if (data.ContainsKey("statusMessages"))
{
downloadHistoryData.Add("statusMessages", data["statusMessages"]);
}
using (var updateCmd = conn.CreateCommand())
{
updateCmd.Transaction = tran;

View File

@ -138,6 +138,12 @@ namespace NzbDrone.Core.Download.TrackedDownloads
{
var state = GetStateFromHistory(downloadHistory.EventType);
trackedDownload.State = state;
if (downloadHistory.EventType == DownloadHistoryEventType.DownloadImportIncomplete)
{
var messages = Json.Deserialize<List<TrackedDownloadStatusMessage>>(downloadHistory.Data["statusMessages"]).ToArray();
trackedDownload.Warn(messages);
}
}
if (historyItems.Any())