mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-25 07:12:40 +00:00
Fixed: Stop downloads requiring manual import from being stuck as Downloaded
This commit is contained in:
parent
0f87cb72e5
commit
b9e780d41c
2 changed files with 11 additions and 0 deletions
|
@ -82,6 +82,11 @@ private void InitialImportedDownloadHistory(IDbConnection conn, IDbTransaction t
|
||||||
downloadHistoryData.Add("downloadClient", data["downloadClient"]);
|
downloadHistoryData.Add("downloadClient", data["downloadClient"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.ContainsKey("statusMessages"))
|
||||||
|
{
|
||||||
|
downloadHistoryData.Add("statusMessages", data["statusMessages"]);
|
||||||
|
}
|
||||||
|
|
||||||
using (var updateCmd = conn.CreateCommand())
|
using (var updateCmd = conn.CreateCommand())
|
||||||
{
|
{
|
||||||
updateCmd.Transaction = tran;
|
updateCmd.Transaction = tran;
|
||||||
|
|
|
@ -138,6 +138,12 @@ public TrackedDownload TrackDownload(DownloadClientDefinition downloadClient, Do
|
||||||
{
|
{
|
||||||
var state = GetStateFromHistory(downloadHistory.EventType);
|
var state = GetStateFromHistory(downloadHistory.EventType);
|
||||||
trackedDownload.State = state;
|
trackedDownload.State = state;
|
||||||
|
|
||||||
|
if (downloadHistory.EventType == DownloadHistoryEventType.DownloadImportIncomplete)
|
||||||
|
{
|
||||||
|
var messages = Json.Deserialize<List<TrackedDownloadStatusMessage>>(downloadHistory.Data["statusMessages"]).ToArray();
|
||||||
|
trackedDownload.Warn(messages);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (historyItems.Any())
|
if (historyItems.Any())
|
||||||
|
|
Loading…
Reference in a new issue