Add Director to role mapper for TMDb

This commit is contained in:
MrTimscampi 2020-05-10 15:16:19 +02:00
parent 9137069f6d
commit d5ad53e4bb
2 changed files with 13 additions and 1 deletions

View File

@ -313,7 +313,13 @@ namespace MediaBrowser.Providers.Tmdb.TV
{
foreach (var actor in seriesInfo.Credits.Cast.OrderBy(a => a.Order))
{
var personInfo = new PersonInfo {Name = actor.Name.Trim(), Role = actor.Character, Type = PersonType.Actor, SortOrder = actor.Order};
var personInfo = new PersonInfo
{
Name = actor.Name.Trim(),
Role = actor.Character,
Type = PersonType.Actor,
SortOrder = actor.Order
};
if (!string.IsNullOrWhiteSpace(actor.Profile_Path))
{

View File

@ -14,6 +14,12 @@ namespace MediaBrowser.Providers.Tmdb
public static string MapCrewToPersonType(Crew crew)
{
if (crew.Department.Equals("production", StringComparison.InvariantCultureIgnoreCase)
&& crew.Job.IndexOf("director", StringComparison.InvariantCultureIgnoreCase) != -1)
{
return PersonType.Director;
}
if (crew.Department.Equals("production", StringComparison.InvariantCultureIgnoreCase)
&& crew.Job.IndexOf("producer", StringComparison.InvariantCultureIgnoreCase) != -1)
{