mirror of
https://github.com/Radarr/Radarr
synced 2026-05-08 16:11:04 +02:00
New: Optionally include Custom Format Score for Discord On File Import notifications
(cherry picked from commit e16ace54a8120cd98007a09fe1e6136be3e699fc) Closes #10313
This commit is contained in:
parent
644876123d
commit
fc97f05850
2 changed files with 11 additions and 1 deletions
|
|
@ -229,6 +229,14 @@ public override void OnDownload(DownloadMessage message)
|
||||||
discordField.Name = "Tags";
|
discordField.Name = "Tags";
|
||||||
discordField.Value = GetTagLabels(message.Movie)?.Join(", ") ?? string.Empty;
|
discordField.Value = GetTagLabels(message.Movie)?.Join(", ") ?? string.Empty;
|
||||||
break;
|
break;
|
||||||
|
case DiscordImportFieldType.CustomFormats:
|
||||||
|
discordField.Name = "Custom Formats";
|
||||||
|
discordField.Value = string.Join("|", message.MovieInfo.CustomFormats);
|
||||||
|
break;
|
||||||
|
case DiscordImportFieldType.CustomFormatScore:
|
||||||
|
discordField.Name = "Custom Format Score";
|
||||||
|
discordField.Value = message.MovieInfo.CustomFormatScore.ToString();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (discordField.Name.IsNotNullOrWhiteSpace() && discordField.Value.IsNotNullOrWhiteSpace())
|
if (discordField.Name.IsNotNullOrWhiteSpace() && discordField.Value.IsNotNullOrWhiteSpace())
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,9 @@ public enum DiscordImportFieldType
|
||||||
Release,
|
Release,
|
||||||
Poster,
|
Poster,
|
||||||
Fanart,
|
Fanart,
|
||||||
Tags
|
Tags,
|
||||||
|
CustomFormats,
|
||||||
|
CustomFormatScore
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DiscordManualInteractionFieldType
|
public enum DiscordManualInteractionFieldType
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue