mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-20 21:16:56 +00:00
Added message to failed history events
This commit is contained in:
parent
6dd2951f80
commit
769fcdfc80
5 changed files with 6 additions and 1 deletions
|
@ -124,6 +124,7 @@ public IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 0)
|
||||||
historyItem.DownloadTime = sabHistoryItem.DownloadTime;
|
historyItem.DownloadTime = sabHistoryItem.DownloadTime;
|
||||||
historyItem.Storage = sabHistoryItem.Storage;
|
historyItem.Storage = sabHistoryItem.Storage;
|
||||||
historyItem.Category = sabHistoryItem.Category;
|
historyItem.Category = sabHistoryItem.Category;
|
||||||
|
historyItem.Message = sabHistoryItem.FailMessage;
|
||||||
historyItem.Status = sabHistoryItem.Status == "Failed" ? HistoryStatus.Failed : HistoryStatus.Completed;
|
historyItem.Status = sabHistoryItem.Status == "Failed" ? HistoryStatus.Failed : HistoryStatus.Completed;
|
||||||
|
|
||||||
historyItems.Add(historyItem);
|
historyItems.Add(historyItem);
|
||||||
|
|
|
@ -13,5 +13,6 @@ public class DownloadFailedEvent : IEvent
|
||||||
public String SourceTitle { get; set; }
|
public String SourceTitle { get; set; }
|
||||||
public String DownloadClient { get; set; }
|
public String DownloadClient { get; set; }
|
||||||
public String DownloadClientId { get; set; }
|
public String DownloadClientId { get; set; }
|
||||||
|
public String Message { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -73,7 +73,8 @@ private void CheckForFailedDownloads()
|
||||||
Quality = historyItem.Quality,
|
Quality = historyItem.Quality,
|
||||||
SourceTitle = historyItem.SourceTitle,
|
SourceTitle = historyItem.SourceTitle,
|
||||||
DownloadClient = historyItem.Data[DOWNLOAD_CLIENT],
|
DownloadClient = historyItem.Data[DOWNLOAD_CLIENT],
|
||||||
DownloadClientId = historyItem.Data[DOWNLOAD_CLIENT_ID]
|
DownloadClientId = historyItem.Data[DOWNLOAD_CLIENT_ID],
|
||||||
|
Message = failedItem.Message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ public class HistoryItem
|
||||||
public String Category { get; set; }
|
public String Category { get; set; }
|
||||||
public Int32 DownloadTime { get; set; }
|
public Int32 DownloadTime { get; set; }
|
||||||
public String Storage { get; set; }
|
public String Storage { get; set; }
|
||||||
|
public String Message { get; set; }
|
||||||
public HistoryStatus Status { get; set; }
|
public HistoryStatus Status { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,7 @@ public void Handle(DownloadFailedEvent message)
|
||||||
|
|
||||||
history.Data.Add("DownloadClient", message.DownloadClient);
|
history.Data.Add("DownloadClient", message.DownloadClient);
|
||||||
history.Data.Add("DownloadClientId", message.DownloadClientId);
|
history.Data.Add("DownloadClientId", message.DownloadClientId);
|
||||||
|
history.Data.Add("Message", message.Message);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue