Fixed: Manually failing a release

This commit is contained in:
Mark McDowall 2014-01-05 11:49:04 -08:00
commit fcd5619041
4 changed files with 10 additions and 5 deletions

View file

@ -132,14 +132,20 @@ namespace NzbDrone.Core.Download
private void PublishDownloadFailedEvent(List<History.History> historyItems, string message)
{
var historyItem = historyItems.First();
string downloadClient;
string downloadClientId;
historyItem.Data.TryGetValue(DOWNLOAD_CLIENT, out downloadClient);
historyItem.Data.TryGetValue(DOWNLOAD_CLIENT_ID, out downloadClientId);
_eventAggregator.PublishEvent(new DownloadFailedEvent
{
SeriesId = historyItem.SeriesId,
EpisodeIds = historyItems.Select(h => h.EpisodeId).ToList(),
Quality = historyItem.Quality,
SourceTitle = historyItem.SourceTitle,
DownloadClient = historyItem.Data[DOWNLOAD_CLIENT],
DownloadClientId = historyItem.Data[DOWNLOAD_CLIENT_ID],
DownloadClient = downloadClient,
DownloadClientId = downloadClientId,
Message = message
});
}