Fixed: Error sending Manual Interaction Required notification
This commit is contained in:
parent
13e29bd257
commit
a12cdb34bc
|
@ -233,15 +233,33 @@ namespace NzbDrone.Core.Notifications
|
||||||
|
|
||||||
public void Handle(ManualInteractionRequiredEvent message)
|
public void Handle(ManualInteractionRequiredEvent message)
|
||||||
{
|
{
|
||||||
|
var series = message.Episode.Series;
|
||||||
|
var mess = "";
|
||||||
|
|
||||||
|
if (series != null)
|
||||||
|
{
|
||||||
|
mess = GetMessage(series, message.Episode.Episodes, message.Episode.ParsedEpisodeInfo.Quality);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mess.IsNullOrWhiteSpace() && message.TrackedDownload.DownloadItem != null)
|
||||||
|
{
|
||||||
|
mess = message.TrackedDownload.DownloadItem.Title;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mess.IsNullOrWhiteSpace())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var manualInteractionMessage = new ManualInteractionRequiredMessage
|
var manualInteractionMessage = new ManualInteractionRequiredMessage
|
||||||
{
|
{
|
||||||
Message = GetMessage(message.Episode.Series, message.Episode.Episodes, message.Episode.ParsedEpisodeInfo.Quality),
|
Message = mess,
|
||||||
Series = message.Episode.Series,
|
Series = series,
|
||||||
Quality = message.Episode.ParsedEpisodeInfo.Quality,
|
Quality = message.Episode.ParsedEpisodeInfo.Quality,
|
||||||
Episode = message.Episode,
|
Episode = message.Episode,
|
||||||
TrackedDownload = message.TrackedDownload,
|
TrackedDownload = message.TrackedDownload,
|
||||||
DownloadClientInfo = message.TrackedDownload.DownloadItem.DownloadClientInfo,
|
DownloadClientInfo = message.TrackedDownload.DownloadItem?.DownloadClientInfo,
|
||||||
DownloadId = message.TrackedDownload.DownloadItem.DownloadId,
|
DownloadId = message.TrackedDownload.DownloadItem?.DownloadId,
|
||||||
Release = message.Release
|
Release = message.Release
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue