You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
5 years ago
|
#pragma warning disable CS1591
|
||
|
|
||
6 years ago
|
using MediaBrowser.Controller.Entities;
|
||
11 years ago
|
using MediaBrowser.Controller.Entities.Movies;
|
||
|
using MediaBrowser.Controller.Entities.TV;
|
||
10 years ago
|
using MediaBrowser.Controller.LiveTv;
|
||
11 years ago
|
using MediaBrowser.Controller.Providers;
|
||
|
using MediaBrowser.Model.Entities;
|
||
5 years ago
|
using MediaBrowser.Model.Providers;
|
||
11 years ago
|
|
||
|
namespace MediaBrowser.Providers.Movies
|
||
|
{
|
||
|
public class ImdbExternalId : IExternalId
|
||
|
{
|
||
5 years ago
|
/// <inheritdoc />
|
||
5 years ago
|
public string ProviderName => "IMDb";
|
||
11 years ago
|
|
||
5 years ago
|
/// <inheritdoc />
|
||
5 years ago
|
public string Key => MetadataProvider.Imdb.ToString();
|
||
11 years ago
|
|
||
5 years ago
|
/// <inheritdoc />
|
||
5 years ago
|
public ExternalIdMediaType? Type => null;
|
||
5 years ago
|
|
||
5 years ago
|
/// <inheritdoc />
|
||
6 years ago
|
public string UrlFormatString => "https://www.imdb.com/title/{0}";
|
||
11 years ago
|
|
||
5 years ago
|
/// <inheritdoc />
|
||
11 years ago
|
public bool Supports(IHasProviderIds item)
|
||
|
{
|
||
9 years ago
|
// Supports images for tv movies
|
||
5 years ago
|
if (item is LiveTvProgram tvProgram && tvProgram.IsMovie)
|
||
9 years ago
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
9 years ago
|
return item is Movie || item is MusicVideo || item is Series || item is Episode || item is Trailer;
|
||
11 years ago
|
}
|
||
|
}
|
||
|
}
|