From 769fcdfc80ff9f9a0722e580c503eed7cc854684 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 24 Oct 2013 18:25:04 -0700 Subject: [PATCH] Added message to failed history events --- src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdClient.cs | 1 + src/NzbDrone.Core/Download/DownloadFailedEvent.cs | 1 + src/NzbDrone.Core/Download/FailedDownloadService.cs | 3 ++- src/NzbDrone.Core/Download/HistoryItem.cs | 1 + src/NzbDrone.Core/History/HistoryService.cs | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdClient.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdClient.cs index 106e5fc71..cba13d63f 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdClient.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdClient.cs @@ -124,6 +124,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd historyItem.DownloadTime = sabHistoryItem.DownloadTime; historyItem.Storage = sabHistoryItem.Storage; historyItem.Category = sabHistoryItem.Category; + historyItem.Message = sabHistoryItem.FailMessage; historyItem.Status = sabHistoryItem.Status == "Failed" ? HistoryStatus.Failed : HistoryStatus.Completed; historyItems.Add(historyItem); diff --git a/src/NzbDrone.Core/Download/DownloadFailedEvent.cs b/src/NzbDrone.Core/Download/DownloadFailedEvent.cs index e2ebde2bc..188ab24f9 100644 --- a/src/NzbDrone.Core/Download/DownloadFailedEvent.cs +++ b/src/NzbDrone.Core/Download/DownloadFailedEvent.cs @@ -13,5 +13,6 @@ namespace NzbDrone.Core.Download public String SourceTitle { get; set; } public String DownloadClient { get; set; } public String DownloadClientId { get; set; } + public String Message { get; set; } } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Download/FailedDownloadService.cs b/src/NzbDrone.Core/Download/FailedDownloadService.cs index edcd10da1..60accd3bc 100644 --- a/src/NzbDrone.Core/Download/FailedDownloadService.cs +++ b/src/NzbDrone.Core/Download/FailedDownloadService.cs @@ -73,7 +73,8 @@ namespace NzbDrone.Core.Download Quality = historyItem.Quality, SourceTitle = historyItem.SourceTitle, DownloadClient = historyItem.Data[DOWNLOAD_CLIENT], - DownloadClientId = historyItem.Data[DOWNLOAD_CLIENT_ID] + DownloadClientId = historyItem.Data[DOWNLOAD_CLIENT_ID], + Message = failedItem.Message }); } } diff --git a/src/NzbDrone.Core/Download/HistoryItem.cs b/src/NzbDrone.Core/Download/HistoryItem.cs index 094270107..1dd969f29 100644 --- a/src/NzbDrone.Core/Download/HistoryItem.cs +++ b/src/NzbDrone.Core/Download/HistoryItem.cs @@ -11,6 +11,7 @@ namespace NzbDrone.Core.Download public String Category { get; set; } public Int32 DownloadTime { get; set; } public String Storage { get; set; } + public String Message { get; set; } public HistoryStatus Status { get; set; } } diff --git a/src/NzbDrone.Core/History/HistoryService.cs b/src/NzbDrone.Core/History/HistoryService.cs index 881900b26..e738393db 100644 --- a/src/NzbDrone.Core/History/HistoryService.cs +++ b/src/NzbDrone.Core/History/HistoryService.cs @@ -148,6 +148,7 @@ namespace NzbDrone.Core.History history.Data.Add("DownloadClient", message.DownloadClient); history.Data.Add("DownloadClientId", message.DownloadClientId); + history.Data.Add("Message", message.Message); _historyRepository.Insert(history); }