diff options
| author | theguymadmax <theguymadmax@proton.me> | 2026-07-06 11:27:24 -0400 |
|---|---|---|
| committer | theguymadmax <theguymadmax@proton.me> | 2026-07-06 11:27:24 -0400 |
| commit | 860cb75d582aa6da0c03571072d43e99c3e87e80 (patch) | |
| tree | 54b6922fd4598c8ec74206b291cd4fe7b209d264 | |
| parent | e31f168e9bc132b4f830e39b0781cac550c08b85 (diff) | |
Add Novel job mapping to the Writing department
| -rw-r--r-- | MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs index 39c0497bed..3664164a1c 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs @@ -48,6 +48,16 @@ namespace MediaBrowser.Providers.Plugins.Tmdb PersonKind.Producer }; + /// <summary> + /// Writing jobs to keep. + /// </summary> + private static readonly HashSet<string> WriterJobs = new(StringComparer.OrdinalIgnoreCase) + { + "writer", + "screenplay", + "novel" + }; + [GeneratedRegex(@"[\W_-[ยท]]+")] private static partial Regex NonWordRegex(); @@ -82,7 +92,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb } if (string.Equals(crew.Department, "writing", StringComparison.OrdinalIgnoreCase) - && (string.Equals(crew.Job, "writer", StringComparison.OrdinalIgnoreCase) || string.Equals(crew.Job, "screenplay", StringComparison.OrdinalIgnoreCase))) + && crew.Job is not null && WriterJobs.Contains(crew.Job)) { return PersonKind.Writer; } |
