From 0e25b2708c2d73d8830df5cebba94fca3e5e8144 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 31 Dec 2024 18:19:34 +0200 Subject: [PATCH] Fixed: Sending Manual Interaction Required notifications to Discord for unknown movies --- src/NzbDrone.Core/Notifications/Discord/Discord.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Discord/Discord.cs b/src/NzbDrone.Core/Notifications/Discord/Discord.cs index 85b874fdb..a3ac651ce 100644 --- a/src/NzbDrone.Core/Notifications/Discord/Discord.cs +++ b/src/NzbDrone.Core/Notifications/Discord/Discord.cs @@ -646,13 +646,19 @@ namespace NzbDrone.Core.Notifications.Discord return title.Length > 256 ? $"{title.AsSpan(0, 253)}..." : title; } - private IEnumerable GetTagLabels(Movie movie) + private List GetTagLabels(Movie movie) { - return movie.Tags? - .Select(t => _tagRepository.Find(t)?.Label) + if (movie == null) + { + return null; + } + + return _tagRepository.GetTags(movie.Tags) + .Select(t => t.Label) .Where(l => l.IsNotNullOrWhiteSpace()) .OrderBy(l => l) - .Take(5); + .Take(5) + .ToList(); } } }