2014-09-22 14:56:54 -07:00
|
|
|
|
using MediaBrowser.Controller.Channels;
|
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-02-21 11:48:15 -07:00
|
|
|
|
using MediaBrowser.Controller.Entities.Movies;
|
|
|
|
|
using MediaBrowser.Controller.Entities.TV;
|
2015-07-12 12:33:00 -07:00
|
|
|
|
using MediaBrowser.Controller.LiveTv;
|
2014-02-21 11:48:15 -07:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
2014-09-22 14:56:54 -07:00
|
|
|
|
using MediaBrowser.Model.Channels;
|
2014-02-21 11:48:15 -07:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Providers.Movies
|
|
|
|
|
{
|
|
|
|
|
public class MovieDbMovieExternalId : IExternalId
|
|
|
|
|
{
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "TheMovieDb"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Key
|
|
|
|
|
{
|
|
|
|
|
get { return MetadataProviders.Tmdb.ToString(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string UrlFormatString
|
|
|
|
|
{
|
|
|
|
|
get { return "http://www.themoviedb.org/movie/{0}"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Supports(IHasProviderIds item)
|
|
|
|
|
{
|
2014-09-22 14:56:54 -07:00
|
|
|
|
var channelItem = item as ChannelVideoItem;
|
|
|
|
|
|
2014-09-28 08:27:26 -07:00
|
|
|
|
if (channelItem != null && channelItem.ContentType == ChannelMediaContentType.MovieExtra && channelItem.ExtraType == ExtraType.Trailer)
|
2014-09-22 14:56:54 -07:00
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-12 12:33:00 -07:00
|
|
|
|
// Supports images for tv movies
|
|
|
|
|
var tvProgram = item as LiveTvProgram;
|
|
|
|
|
if (tvProgram != null && tvProgram.IsMovie)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-02 20:13:03 -07:00
|
|
|
|
return item is Movie || item is MusicVideo;
|
2014-02-21 11:48:15 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class MovieDbSeriesExternalId : IExternalId
|
|
|
|
|
{
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "TheMovieDb"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Key
|
|
|
|
|
{
|
|
|
|
|
get { return MetadataProviders.Tmdb.ToString(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string UrlFormatString
|
|
|
|
|
{
|
|
|
|
|
get { return "http://www.themoviedb.org/tv/{0}"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Supports(IHasProviderIds item)
|
|
|
|
|
{
|
|
|
|
|
return item is Series;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-21 14:44:10 -07:00
|
|
|
|
public class MovieDbMovieCollectionExternalId : IExternalId
|
|
|
|
|
{
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "TheMovieDb Collection"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Key
|
|
|
|
|
{
|
|
|
|
|
get { return MetadataProviders.TmdbCollection.ToString(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string UrlFormatString
|
|
|
|
|
{
|
|
|
|
|
get { return "http://www.themoviedb.org/collection/{0}"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Supports(IHasProviderIds item)
|
|
|
|
|
{
|
2014-12-02 20:13:03 -07:00
|
|
|
|
return item is Movie || item is MusicVideo;
|
2014-02-21 14:44:10 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-21 11:48:15 -07:00
|
|
|
|
public class MovieDbPersonExternalId : IExternalId
|
|
|
|
|
{
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "TheMovieDb"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Key
|
|
|
|
|
{
|
|
|
|
|
get { return MetadataProviders.Tmdb.ToString(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string UrlFormatString
|
|
|
|
|
{
|
|
|
|
|
get { return "http://www.themoviedb.org/person/{0}"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Supports(IHasProviderIds item)
|
|
|
|
|
{
|
|
|
|
|
return item is Person;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class MovieDbCollectionExternalId : IExternalId
|
|
|
|
|
{
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "TheMovieDb"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Key
|
|
|
|
|
{
|
|
|
|
|
get { return MetadataProviders.Tmdb.ToString(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string UrlFormatString
|
|
|
|
|
{
|
|
|
|
|
get { return "http://www.themoviedb.org/collection/{0}"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Supports(IHasProviderIds item)
|
|
|
|
|
{
|
|
|
|
|
return item is BoxSet;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ImdbExternalId : IExternalId
|
|
|
|
|
{
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "IMDb"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Key
|
|
|
|
|
{
|
|
|
|
|
get { return MetadataProviders.Imdb.ToString(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string UrlFormatString
|
|
|
|
|
{
|
|
|
|
|
get { return "http://www.imdb.com/title/{0}"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Supports(IHasProviderIds item)
|
|
|
|
|
{
|
2014-09-22 14:56:54 -07:00
|
|
|
|
var channelItem = item as ChannelVideoItem;
|
|
|
|
|
|
2014-09-28 08:27:26 -07:00
|
|
|
|
if (channelItem != null && channelItem.ContentType == ChannelMediaContentType.MovieExtra && channelItem.ExtraType == ExtraType.Trailer)
|
2014-09-22 14:56:54 -07:00
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-02 20:13:03 -07:00
|
|
|
|
return item is Movie || item is MusicVideo || item is Series || item is Episode;
|
2014-02-21 11:48:15 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class ImdbPersonExternalId : IExternalId
|
|
|
|
|
{
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "IMDb"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Key
|
|
|
|
|
{
|
|
|
|
|
get { return MetadataProviders.Imdb.ToString(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string UrlFormatString
|
|
|
|
|
{
|
|
|
|
|
get { return "http://www.imdb.com/name/{0}"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Supports(IHasProviderIds item)
|
|
|
|
|
{
|
|
|
|
|
return item is Person;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|