diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index ec65221bc..e1a91086b 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -287,7 +287,9 @@ namespace MediaBrowser.Controller.Entities.TV id.AnimeSeriesIndex = series.AnimeSeriesIndex; } + id.IsMissingEpisode = IsMissingEpisode; id.IndexNumberEnd = IndexNumberEnd; + id.IsVirtualUnaired = IsVirtualUnaired; return id; } diff --git a/MediaBrowser.Controller/Providers/EpisodeInfo.cs b/MediaBrowser.Controller/Providers/EpisodeInfo.cs index 28abd636a..b879040f8 100644 --- a/MediaBrowser.Controller/Providers/EpisodeInfo.cs +++ b/MediaBrowser.Controller/Providers/EpisodeInfo.cs @@ -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(StringComparer.OrdinalIgnoreCase); diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 3d584e858..eeec4ea56 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -310,6 +310,11 @@ namespace MediaBrowser.Providers.Manager return true; } + if (!(item is Audio) && !(item is Video)) + { + return true; + } + return false; } diff --git a/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs b/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs index 785efc3b6..5da1fcf27 100644 --- a/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs @@ -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)) { diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs index 42254f360..9bab3d380 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs @@ -64,6 +64,12 @@ namespace MediaBrowser.Providers.TV { var result = new MetadataResult(); + // Allowing this will dramatically increase scan times + if (info.IsMissingEpisode || info.IsVirtualUnaired) + { + return result; + } + string seriesTmdbId; info.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out seriesTmdbId);