From a1255bda6a854dac20a6b0731453e96daf910347 Mon Sep 17 00:00:00 2001 From: theguymadmax Date: Wed, 8 Jul 2026 11:45:16 -0400 Subject: [PATCH] Use FrozenSet --- MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs index 3664164a1c..7e6b9beee9 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Frozen; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Text.RegularExpressions; @@ -51,12 +52,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb /// /// Writing jobs to keep. /// - private static readonly HashSet WriterJobs = new(StringComparer.OrdinalIgnoreCase) + private static readonly FrozenSet _writerJobs = new[] { "writer", "screenplay", "novel" - }; + }.ToFrozenSet(StringComparer.OrdinalIgnoreCase); [GeneratedRegex(@"[\W_-[ยท]]+")] private static partial Regex NonWordRegex(); @@ -92,7 +93,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb } if (string.Equals(crew.Department, "writing", StringComparison.OrdinalIgnoreCase) - && crew.Job is not null && WriterJobs.Contains(crew.Job)) + && crew.Job is not null && _writerJobs.Contains(crew.Job)) { return PersonKind.Writer; }