1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-26 22:46:53 -04:00

Fixed: Ignore invalid tags in CustomScript/Discord/Webhook

This commit is contained in:
Bogdan
2024-02-08 00:47:40 +02:00
parent 2510f44c25
commit 3d0f22ca7c
3 changed files with 11 additions and 3 deletions
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Localization;
using NzbDrone.Core.MediaFiles;
@@ -253,7 +254,10 @@ namespace NzbDrone.Core.Notifications.Webhook
private IEnumerable<string> GetTagLabels(Movie movie)
{
return movie.Tags?.Select(t => _tagRepository.Get(t)?.Label).OrderBy(t => t);
return movie.Tags?
.Select(t => _tagRepository.Find(t)?.Label)
.Where(l => l.IsNotNullOrWhiteSpace())
.OrderBy(l => l);
}
}
}