mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 21:37:59 +03:00
Merge pull request #17248 from theguymadmax/add-novel
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Frozen;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -48,6 +49,16 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
|
||||
PersonKind.Producer
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Writing jobs to keep.
|
||||
/// </summary>
|
||||
private static readonly FrozenSet<string> _writerJobs = new[]
|
||||
{
|
||||
"writer",
|
||||
"screenplay",
|
||||
"novel"
|
||||
}.ToFrozenSet(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
[GeneratedRegex(@"[\W_-[·]]+")]
|
||||
private static partial Regex NonWordRegex();
|
||||
|
||||
@@ -82,7 +93,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user