2019-08-18 11:20:52 +00:00
|
|
|
using System;
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
using MediaBrowser.Providers.Tmdb.Models.General;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Providers.Tmdb
|
|
|
|
{
|
|
|
|
public static class TmdbUtils
|
|
|
|
{
|
2019-08-18 11:34:44 +00:00
|
|
|
public const string BaseTmdbUrl = "https://www.themoviedb.org/";
|
|
|
|
public const string BaseTmdbApiUrl = "https://api.themoviedb.org/";
|
2019-08-18 11:20:52 +00:00
|
|
|
public const string ProviderName = "TheMovieDb";
|
|
|
|
public const string ApiKey = "4219e299c89411838049ab0dab19ebd5";
|
|
|
|
public const string AcceptHeader = "application/json,image/*";
|
|
|
|
|
|
|
|
public static string MapCrewToPersonType(Crew crew)
|
|
|
|
{
|
2019-08-18 12:44:13 +00:00
|
|
|
if (crew.Department.Equals("production", StringComparison.InvariantCultureIgnoreCase)
|
|
|
|
&& crew.Job.IndexOf("producer", StringComparison.InvariantCultureIgnoreCase) != -1)
|
2019-08-18 11:20:52 +00:00
|
|
|
{
|
|
|
|
return PersonType.Producer;
|
|
|
|
}
|
|
|
|
|
2019-08-18 12:44:13 +00:00
|
|
|
if (crew.Department.Equals("writing", StringComparison.InvariantCultureIgnoreCase))
|
2019-08-18 11:20:52 +00:00
|
|
|
{
|
|
|
|
return PersonType.Writer;
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|