Fixed: Error logged when notification fails to send after episode file is deleted

Closes #4289
pull/4317/head
Mark McDowall 4 years ago
parent 044342f677
commit 795bc91d25

@ -195,6 +195,11 @@ namespace NzbDrone.Core.Notifications
public void Handle(EpisodeFileDeletedEvent message) public void Handle(EpisodeFileDeletedEvent message)
{ {
if (message.EpisodeFile.Episodes.Value.Empty())
{
_logger.Trace("Skipping notification for deleted file without an episode (episode metadata was removed)");
}
var deleteMessage = new EpisodeDeleteMessage(); var deleteMessage = new EpisodeDeleteMessage();
deleteMessage.Message = GetMessage(message.EpisodeFile.Series, message.EpisodeFile.Episodes, message.EpisodeFile.Quality); deleteMessage.Message = GetMessage(message.EpisodeFile.Series, message.EpisodeFile.Episodes, message.EpisodeFile.Quality);
deleteMessage.Series = message.EpisodeFile.Series; deleteMessage.Series = message.EpisodeFile.Series;

Loading…
Cancel
Save