using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
{
///
/// External ID for a TMBD movie.
///
public class TmdbMovieExternalId : IExternalId
{
///
public string ProviderName => TmdbUtils.ProviderName;
///
public string Key => MetadataProvider.Tmdb.ToString();
///
public ExternalIdMediaType? Type => ExternalIdMediaType.Movie;
///
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "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;
}
}
}