parent
25a590e8cd
commit
817d9b3389
@ -0,0 +1,21 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.BoxSets
|
||||
{
|
||||
public class TmdbBoxSetExternalId : IExternalId
|
||||
{
|
||||
public string Name => TmdbUtils.ProviderName;
|
||||
|
||||
public string Key => MetadataProviders.TmdbCollection.ToString();
|
||||
|
||||
public string UrlFormatString => TmdbUtils.BaseMovieDbUrl + "collection/{0}";
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
return item is Movie || item is MusicVideo || item is Trailer;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Collections
|
||||
{
|
||||
public class CollectionImages
|
||||
{
|
||||
public List<Backdrop> backdrops { get; set; }
|
||||
public List<Poster> posters { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Collections
|
||||
{
|
||||
public class CollectionResult
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string overview { get; set; }
|
||||
public string poster_path { get; set; }
|
||||
public string backdrop_path { get; set; }
|
||||
public List<Part> parts { get; set; }
|
||||
public CollectionImages images { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Collections
|
||||
{
|
||||
public class Part
|
||||
{
|
||||
public string title { get; set; }
|
||||
public int id { get; set; }
|
||||
public string release_date { get; set; }
|
||||
public string poster_path { get; set; }
|
||||
public string backdrop_path { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Backdrop
|
||||
{
|
||||
public double aspect_ratio { get; set; }
|
||||
public string file_path { get; set; }
|
||||
public int height { get; set; }
|
||||
public string iso_639_1 { get; set; }
|
||||
public double vote_average { get; set; }
|
||||
public int vote_count { get; set; }
|
||||
public int width { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Crew
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string credit_id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string department { get; set; }
|
||||
public string job { get; set; }
|
||||
public string profile_path { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class ExternalIds
|
||||
{
|
||||
public string imdb_id { get; set; }
|
||||
public object freebase_id { get; set; }
|
||||
public string freebase_mid { get; set; }
|
||||
public int tvdb_id { get; set; }
|
||||
public int tvrage_id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Genre
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Images
|
||||
{
|
||||
public List<Backdrop> backdrops { get; set; }
|
||||
public List<Poster> posters { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Keyword
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Keywords
|
||||
{
|
||||
public List<Keyword> results { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Poster
|
||||
{
|
||||
public double aspect_ratio { get; set; }
|
||||
public string file_path { get; set; }
|
||||
public int height { get; set; }
|
||||
public string iso_639_1 { get; set; }
|
||||
public double vote_average { get; set; }
|
||||
public int vote_count { get; set; }
|
||||
public int width { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Profile
|
||||
{
|
||||
public string file_path { get; set; }
|
||||
public int width { get; set; }
|
||||
public int height { get; set; }
|
||||
public object iso_639_1 { get; set; }
|
||||
public double aspect_ratio { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Still
|
||||
{
|
||||
public double aspect_ratio { get; set; }
|
||||
public string file_path { get; set; }
|
||||
public int height { get; set; }
|
||||
public string id { get; set; }
|
||||
public string iso_639_1 { get; set; }
|
||||
public double vote_average { get; set; }
|
||||
public int vote_count { get; set; }
|
||||
public int width { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class StillImages
|
||||
{
|
||||
public List<Still> stills { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Video
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string iso_639_1 { get; set; }
|
||||
public string iso_3166_1 { get; set; }
|
||||
public string key { get; set; }
|
||||
public string name { get; set; }
|
||||
public string site { get; set; }
|
||||
public string size { get; set; }
|
||||
public string type { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.General
|
||||
{
|
||||
public class Videos
|
||||
{
|
||||
public List<Video> results { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class BelongsToCollection
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string poster_path { get; set; }
|
||||
public string backdrop_path { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class Cast
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string character { get; set; }
|
||||
public int order { get; set; }
|
||||
public int cast_id { get; set; }
|
||||
public string profile_path { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class Casts
|
||||
{
|
||||
public List<Cast> cast { get; set; }
|
||||
public List<Crew> crew { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class Country
|
||||
{
|
||||
public string iso_3166_1 { get; set; }
|
||||
public string certification { get; set; }
|
||||
public DateTime release_date { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class MovieResult
|
||||
{
|
||||
public bool adult { get; set; }
|
||||
public string backdrop_path { get; set; }
|
||||
public BelongsToCollection belongs_to_collection { get; set; }
|
||||
public int budget { get; set; }
|
||||
public List<Genre> genres { get; set; }
|
||||
public string homepage { get; set; }
|
||||
public int id { get; set; }
|
||||
public string imdb_id { get; set; }
|
||||
public string original_title { get; set; }
|
||||
public string original_name { get; set; }
|
||||
public string overview { get; set; }
|
||||
public double popularity { get; set; }
|
||||
public string poster_path { get; set; }
|
||||
public List<ProductionCompany> production_companies { get; set; }
|
||||
public List<ProductionCountry> production_countries { get; set; }
|
||||
public string release_date { get; set; }
|
||||
public int revenue { get; set; }
|
||||
public int runtime { get; set; }
|
||||
public List<SpokenLanguage> spoken_languages { get; set; }
|
||||
public string status { get; set; }
|
||||
public string tagline { get; set; }
|
||||
public string title { get; set; }
|
||||
public string name { get; set; }
|
||||
public double vote_average { get; set; }
|
||||
public int vote_count { get; set; }
|
||||
public Casts casts { get; set; }
|
||||
public Releases releases { get; set; }
|
||||
public Images images { get; set; }
|
||||
public Keywords keywords { get; set; }
|
||||
public Trailers trailers { get; set; }
|
||||
|
||||
public string GetOriginalTitle()
|
||||
{
|
||||
return original_name ?? original_title;
|
||||
}
|
||||
|
||||
public string GetTitle()
|
||||
{
|
||||
return name ?? title ?? GetOriginalTitle();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class ProductionCompany
|
||||
{
|
||||
public string name { get; set; }
|
||||
public int id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class ProductionCountry
|
||||
{
|
||||
public string iso_3166_1 { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class Releases
|
||||
{
|
||||
public List<Country> countries { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class SpokenLanguage
|
||||
{
|
||||
public string iso_639_1 { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class Trailers
|
||||
{
|
||||
public List<Youtube> youtube { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Movies
|
||||
{
|
||||
public class Youtube
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string size { get; set; }
|
||||
public string source { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.People
|
||||
{
|
||||
public class PersonImages
|
||||
{
|
||||
public List<Profile> profiles { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.People
|
||||
{
|
||||
public class PersonResult
|
||||
{
|
||||
public bool adult { get; set; }
|
||||
public List<string> also_known_as { get; set; }
|
||||
public string biography { get; set; }
|
||||
public string birthday { get; set; }
|
||||
public string deathday { get; set; }
|
||||
public string homepage { get; set; }
|
||||
public int id { get; set; }
|
||||
public string imdb_id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string place_of_birth { get; set; }
|
||||
public double popularity { get; set; }
|
||||
public string profile_path { get; set; }
|
||||
public PersonImages images { get; set; }
|
||||
public ExternalIds external_ids { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.People
|
||||
{
|
||||
public class PersonSearchResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="PersonSearchResult" /> is adult.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if adult; otherwise, <c>false</c>.</value>
|
||||
public bool Adult { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the id.
|
||||
/// </summary>
|
||||
/// <value>The id.</value>
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the profile_ path.
|
||||
/// </summary>
|
||||
/// <value>The profile_ path.</value>
|
||||
public string Profile_Path { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.People
|
||||
{
|
||||
public class PersonSearchResults
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the page.
|
||||
/// </summary>
|
||||
/// <value>The page.</value>
|
||||
public int Page { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the results.
|
||||
/// </summary>
|
||||
/// <value>The results.</value>
|
||||
public List<PersonSearchResult> Results { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the total_ pages.
|
||||
/// </summary>
|
||||
/// <value>The total_ pages.</value>
|
||||
public int Total_Pages { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the total_ results.
|
||||
/// </summary>
|
||||
/// <value>The total_ results.</value>
|
||||
public int Total_Results { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Movies;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Search
|
||||
{
|
||||
public class ExternalIdLookupResult
|
||||
{
|
||||
public List<TvResult> tv_results { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Search
|
||||
{
|
||||
public class MovieResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="TmdbMovieSearchResult" /> is adult.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if adult; otherwise, <c>false</c>.</value>
|
||||
public bool adult { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the backdrop_path.
|
||||
/// </summary>
|
||||
/// <value>The backdrop_path.</value>
|
||||
public string backdrop_path { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the id.
|
||||
/// </summary>
|
||||
/// <value>The id.</value>
|
||||
public int id { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the original_title.
|
||||
/// </summary>
|
||||
/// <value>The original_title.</value>
|
||||
public string original_title { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the original_name.
|
||||
/// </summary>
|
||||
/// <value>The original_name.</value>
|
||||
public string original_name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the release_date.
|
||||
/// </summary>
|
||||
/// <value>The release_date.</value>
|
||||
public string release_date { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the poster_path.
|
||||
/// </summary>
|
||||
/// <value>The poster_path.</value>
|
||||
public string poster_path { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the popularity.
|
||||
/// </summary>
|
||||
/// <value>The popularity.</value>
|
||||
public double popularity { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
/// <value>The title.</value>
|
||||
public string title { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the vote_average.
|
||||
/// </summary>
|
||||
/// <value>The vote_average.</value>
|
||||
public double vote_average { get; set; }
|
||||
/// <summary>
|
||||
/// For collection search results
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the vote_count.
|
||||
/// </summary>
|
||||
/// <value>The vote_count.</value>
|
||||
public int vote_count { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Search
|
||||
{
|
||||
public class MovieSearchResults
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the page.
|
||||
/// </summary>
|
||||
/// <value>The page.</value>
|
||||
public int page { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the results.
|
||||
/// </summary>
|
||||
/// <value>The results.</value>
|
||||
public List<MovieResult> results { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the total_pages.
|
||||
/// </summary>
|
||||
/// <value>The total_pages.</value>
|
||||
public int total_pages { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the total_results.
|
||||
/// </summary>
|
||||
/// <value>The total_results.</value>
|
||||
public int total_results { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Search
|
||||
{
|
||||
public class TvResult
|
||||
{
|
||||
public string backdrop_path { get; set; }
|
||||
public string first_air_date { get; set; }
|
||||
public int id { get; set; }
|
||||
public string original_name { get; set; }
|
||||
public string poster_path { get; set; }
|
||||
public double popularity { get; set; }
|
||||
public string name { get; set; }
|
||||
public double vote_average { get; set; }
|
||||
public int vote_count { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.Search
|
||||
{
|
||||
public class TvSearchResults
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the page.
|
||||
/// </summary>
|
||||
/// <value>The page.</value>
|
||||
public int page { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the results.
|
||||
/// </summary>
|
||||
/// <value>The results.</value>
|
||||
public List<TvResult> results { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the total_pages.
|
||||
/// </summary>
|
||||
/// <value>The total_pages.</value>
|
||||
public int total_pages { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the total_results.
|
||||
/// </summary>
|
||||
/// <value>The total_results.</value>
|
||||
public int total_results { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class Cast
|
||||
{
|
||||
public string character { get; set; }
|
||||
public string credit_id { get; set; }
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string profile_path { get; set; }
|
||||
public int order { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class ContentRating
|
||||
{
|
||||
public string iso_3166_1 { get; set; }
|
||||
public string rating { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class ContentRatings
|
||||
{
|
||||
public List<ContentRating> results { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class CreatedBy
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string profile_path { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class Credits
|
||||
{
|
||||
public List<Cast> cast { get; set; }
|
||||
public List<Crew> crew { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class Episode
|
||||
{
|
||||
public string air_date { get; set; }
|
||||
public int episode_number { get; set; }
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string overview { get; set; }
|
||||
public string still_path { get; set; }
|
||||
public double vote_average { get; set; }
|
||||
public int vote_count { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class EpisodeCredits
|
||||
{
|
||||
public List<Cast> cast { get; set; }
|
||||
public List<Crew> crew { get; set; }
|
||||
public List<GuestStar> guest_stars { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class EpisodeResult
|
||||
{
|
||||
public DateTime air_date { get; set; }
|
||||
public int episode_number { get; set; }
|
||||
public string name { get; set; }
|
||||
public string overview { get; set; }
|
||||
public int id { get; set; }
|
||||
public object production_code { get; set; }
|
||||
public int season_number { get; set; }
|
||||
public string still_path { get; set; }
|
||||
public double vote_average { get; set; }
|
||||
public int vote_count { get; set; }
|
||||
public StillImages images { get; set; }
|
||||
public ExternalIds external_ids { get; set; }
|
||||
public EpisodeCredits credits { get; set; }
|
||||
public Tmdb.Models.General.Videos videos { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class GuestStar
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string credit_id { get; set; }
|
||||
public string character { get; set; }
|
||||
public int order { get; set; }
|
||||
public string profile_path { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class Network
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class Season
|
||||
{
|
||||
public string air_date { get; set; }
|
||||
public int episode_count { get; set; }
|
||||
public int id { get; set; }
|
||||
public string poster_path { get; set; }
|
||||
public int season_number { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class SeasonImages
|
||||
{
|
||||
public List<Poster> posters { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class SeasonResult
|
||||
{
|
||||
public DateTime air_date { get; set; }
|
||||
public List<Episode> episodes { get; set; }
|
||||
public string name { get; set; }
|
||||
public string overview { get; set; }
|
||||
public int id { get; set; }
|
||||
public string poster_path { get; set; }
|
||||
public int season_number { get; set; }
|
||||
public Credits credits { get; set; }
|
||||
public SeasonImages images { get; set; }
|
||||
public ExternalIds external_ids { get; set; }
|
||||
public General.Videos videos { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Models.TV
|
||||
{
|
||||
public class SeriesResult
|
||||
{
|
||||
public string backdrop_path { get; set; }
|
||||
public List<CreatedBy> created_by { get; set; }
|
||||
public List<int> episode_run_time { get; set; }
|
||||
public DateTime first_air_date { get; set; }
|
||||
public List<Genre> genres { get; set; }
|
||||
public string homepage { get; set; }
|
||||
public int id { get; set; }
|
||||
public bool in_production { get; set; }
|
||||
public List<string> languages { get; set; }
|
||||
public DateTime last_air_date { get; set; }
|
||||
public string name { get; set; }
|
||||
public List<Network> networks { get; set; }
|
||||
public int number_of_episodes { get; set; }
|
||||
public int number_of_seasons { get; set; }
|
||||
public string original_name { get; set; }
|
||||
public List<string> origin_country { get; set; }
|
||||
public string overview { get; set; }
|
||||
public string popularity { get; set; }
|
||||
public string poster_path { get; set; }
|
||||
public List<Season> seasons { get; set; }
|
||||
public string status { get; set; }
|
||||
public double vote_average { get; set; }
|
||||
public int vote_count { get; set; }
|
||||
public Credits credits { get; set; }
|
||||
public Images images { get; set; }
|
||||
public Keywords keywords { get; set; }
|
||||
public ExternalIds external_ids { get; set; }
|
||||
public General.Videos videos { get; set; }
|
||||
public ContentRatings content_ratings { get; set; }
|
||||
public string ResultLanguage { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.Movies
|
||||
{
|
||||
public class TmdbMovieExternalId : IExternalId
|
||||
{
|
||||
public string Name => TmdbUtils.ProviderName;
|
||||
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
|
||||
public string UrlFormatString => TmdbUtils.BaseMovieDbUrl + "movie/{0}";
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
// Supports images for tv movies
|
||||
if (item is LiveTvProgram tvProgram && tvProgram.IsMovie)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return item is Movie || item is MusicVideo || item is Trailer;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Providers.Movies
|
||||
namespace MediaBrowser.Providers.Tmdb.Movies
|
||||
{
|
||||
internal class TmdbImageSettings
|
||||
{
|
@ -0,0 +1,20 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.People
|
||||
{
|
||||
public class TmdbPersonExternalId : IExternalId
|
||||
{
|
||||
public string Name => TmdbUtils.ProviderName;
|
||||
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
|
||||
public string UrlFormatString => TmdbUtils.BaseMovieDbUrl + "person/{0}";
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
return item is Person;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Tmdb.TV
|
||||
{
|
||||
public class TmdbSeriesExternalId : IExternalId
|
||||
{
|
||||
public string Name => TmdbUtils.ProviderName;
|
||||
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
|
||||
public string UrlFormatString => TmdbUtils.BaseMovieDbUrl + "tv/{0}";
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
return item is Series;
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue