1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

New: Add more information to Webhook payload

Fixes #5104

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick
2020-10-04 00:39:45 -04:00
parent 37197150be
commit a66b2cf416
2 changed files with 13 additions and 0 deletions
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using FluentValidation.Results;
using NzbDrone.Common.Extensions;
@@ -51,6 +52,15 @@ namespace NzbDrone.Core.Notifications.Webhook
DownloadId = message.DownloadId
};
if (message.OldMovieFiles.Any())
{
payload.DeletedFiles = message.OldMovieFiles.ConvertAll(x =>
new WebhookMovieFile(x)
{
Path = Path.Combine(message.Movie.Path, x.RelativePath)
});
}
_proxy.SendWebhook(payload, Settings);
}