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

Closes #4289
This commit is contained in:
Mark McDowall 2021-02-08 16:39:47 -08:00
parent 044342f677
commit 795bc91d25
1 changed files with 5 additions and 0 deletions

View File

@ -195,6 +195,11 @@ namespace NzbDrone.Core.Notifications
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();
deleteMessage.Message = GetMessage(message.EpisodeFile.Series, message.EpisodeFile.Episodes, message.EpisodeFile.Quality);
deleteMessage.Series = message.EpisodeFile.Series;