aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/Tmdb/TmdbUtils.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Providers/Tmdb/TmdbUtils.cs')
-rw-r--r--MediaBrowser.Providers/Tmdb/TmdbUtils.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/MediaBrowser.Providers/Tmdb/TmdbUtils.cs b/MediaBrowser.Providers/Tmdb/TmdbUtils.cs
new file mode 100644
index 000000000..5874112c9
--- /dev/null
+++ b/MediaBrowser.Providers/Tmdb/TmdbUtils.cs
@@ -0,0 +1,30 @@
+using System;
+using MediaBrowser.Model.Entities;
+using MediaBrowser.Providers.Tmdb.Models.General;
+
+namespace MediaBrowser.Providers.Tmdb
+{
+ public static class TmdbUtils
+ {
+ public const string BaseMovieDbUrl = "https://www.themoviedb.org/";
+ public const string ProviderName = "TheMovieDb";
+ public const string ApiKey = "4219e299c89411838049ab0dab19ebd5";
+ public const string AcceptHeader = "application/json,image/*";
+
+ public static string MapCrewToPersonType(Crew crew)
+ {
+ if (crew.department.Equals("production", StringComparison.InvariantCultureIgnoreCase)
+ && crew.job.IndexOf("producer", StringComparison.InvariantCultureIgnoreCase) != -1)
+ {
+ return PersonType.Producer;
+ }
+
+ if (crew.department.Equals("writing", StringComparison.InvariantCultureIgnoreCase))
+ {
+ return PersonType.Writer;
+ }
+
+ return null;
+ }
+ }
+}