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

New: Include renamed file information for Webhook and Custom Scripts

Closes #3927

(cherry picked from commit 3c45349404f59064d1c8db0549401189c456e4c0)
This commit is contained in:
Mark McDowall
2021-02-13 15:24:56 -08:00
committed by Qstick
parent 425772da1c
commit 94b481a66f
18 changed files with 97 additions and 23 deletions
@@ -3,6 +3,7 @@ using System.IO;
using System.Linq;
using FluentValidation.Results;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Validation;
@@ -64,12 +65,13 @@ namespace NzbDrone.Core.Notifications.Webhook
_proxy.SendWebhook(payload, Settings);
}
public override void OnMovieRename(Movie movie)
public override void OnMovieRename(Movie movie, List<RenamedMovieFile> renamedFiles)
{
var payload = new WebhookRenamePayload
{
EventType = WebhookEventType.Rename,
Movie = new WebhookMovie(movie)
Movie = new WebhookMovie(movie),
RenamedMovieFiles = renamedFiles.ConvertAll(x => new WebhookRenamedMovieFile(x))
};
_proxy.SendWebhook(payload, Settings);