1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Add per-file rename information for Discord and Slack

This commit is contained in:
junk_receiver 2021-09-10 19:44:44 -07:00 committed by Qstick
parent 94b481a66f
commit beca2c99ca
2 changed files with 20 additions and 14 deletions

View File

@ -216,13 +216,16 @@ public override void OnDownload(DownloadMessage message)
public override void OnMovieRename(Movie movie, List<RenamedMovieFile> renamedFiles)
{
var attachments = new List<Embed>
{
new Embed
{
Title = movie.Title,
}
};
var attachments = new List<Embed>();
foreach (RenamedMovieFile renamedFile in renamedFiles)
{
attachments.Add(new Embed
{
Title = movie.Title,
Description = renamedFile.PreviousRelativePath + " renamed to " + renamedFile.MovieFile.RelativePath,
});
}
var payload = CreatePayload("Renamed", attachments);

View File

@ -59,13 +59,16 @@ public override void OnDownload(DownloadMessage message)
public override void OnMovieRename(Movie movie, List<RenamedMovieFile> renamedFiles)
{
var attachments = new List<Attachment>
{
new Attachment
{
Title = movie.Title,
}
};
var attachments = new List<Attachment>();
foreach (RenamedMovieFile renamedFile in renamedFiles)
{
attachments.Add(new Attachment
{
Title = movie.Title,
Text = renamedFile.PreviousRelativePath + " renamed to " + renamedFile.MovieFile.RelativePath,
});
}
var payload = CreatePayload("Renamed", attachments);