don't use omdb for missing episodes

This commit is contained in:
Luke Pulverenti 2016-04-18 00:25:43 -04:00
parent 169554ccc4
commit 916b148274
5 changed files with 23 additions and 1 deletions

View File

@ -287,7 +287,9 @@ namespace MediaBrowser.Controller.Entities.TV
id.AnimeSeriesIndex = series.AnimeSeriesIndex;
}
id.IsMissingEpisode = IsMissingEpisode;
id.IndexNumberEnd = IndexNumberEnd;
id.IsVirtualUnaired = IsVirtualUnaired;
return id;
}

View File

@ -10,6 +10,9 @@ namespace MediaBrowser.Controller.Providers
public int? IndexNumberEnd { get; set; }
public int? AnimeSeriesIndex { get; set; }
public bool IsMissingEpisode { get; set; }
public bool IsVirtualUnaired { get; set; }
public EpisodeInfo()
{
SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

View File

@ -310,6 +310,11 @@ namespace MediaBrowser.Providers.Manager
return true;
}
if (!(item is Audio) && !(item is Video))
{
return true;
}
return false;
}

View File

@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.TV
{
private readonly IJsonSerializer _jsonSerializer;
private readonly IHttpClient _httpClient;
private OmdbItemProvider _itemProvider;
private readonly OmdbItemProvider _itemProvider;
public OmdbEpisodeProvider(IJsonSerializer jsonSerializer, IHttpClient httpClient, ILogger logger, ILibraryManager libraryManager)
{
@ -41,6 +41,12 @@ namespace MediaBrowser.Providers.TV
Item = new Episode()
};
// Allowing this will dramatically increase scan times
if (info.IsMissingEpisode || info.IsVirtualUnaired)
{
return result;
}
var imdbId = info.GetProviderId(MetadataProviders.Imdb);
if (string.IsNullOrWhiteSpace(imdbId))
{

View File

@ -64,6 +64,12 @@ namespace MediaBrowser.Providers.TV
{
var result = new MetadataResult<Episode>();
// Allowing this will dramatically increase scan times
if (info.IsMissingEpisode || info.IsVirtualUnaired)
{
return result;
}
string seriesTmdbId;
info.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out seriesTmdbId);