From 1e0967f43c4eea104bd16347aaef3007cb3b820d Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Wed, 11 Dec 2019 23:47:51 +0100 Subject: [PATCH 1/3] Fix issue with episode search --- MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs index e5287048dc..4269d34201 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs @@ -35,9 +35,8 @@ namespace MediaBrowser.Providers.TV.TheTVDB { var list = new List(); - // The search query must either provide an episode number or date - if (!searchInfo.IndexNumber.HasValue - || !searchInfo.PremiereDate.HasValue + // Either an episode number or date must be provided; and the dictionary of provider ids must be valid + if ((searchInfo.IndexNumber == null && searchInfo.PremiereDate == null) || !TvdbSeriesProvider.IsValidSeries(searchInfo.SeriesProviderIds)) { return list; From 421092b478419ecd72a607b88ab4cd15e89d9017 Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Wed, 11 Dec 2019 23:48:41 +0100 Subject: [PATCH 2/3] Clean up checks for Dictionary keys --- .../TV/TheTVDB/TvdbSeriesProvider.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs index 10ed4f0731..72ceadaf1d 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs @@ -170,11 +170,16 @@ namespace MediaBrowser.Providers.TV.TheTVDB return result?.Data.First().Id.ToString(); } + /// + /// Check whether a dictionary of provider IDs includes an entry for a valid TV metadata provider. + /// + /// The dictionary to check. + /// True, if the dictionary contains a valid TV provider ID, otherwise false. internal static bool IsValidSeries(Dictionary seriesProviderIds) { - return seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out _) || - seriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out _) || - seriesProviderIds.TryGetValue(MetadataProviders.Zap2It.ToString(), out _); + return seriesProviderIds.ContainsKey(MetadataProviders.Tvdb.ToString()) || + seriesProviderIds.ContainsKey(MetadataProviders.Imdb.ToString()) || + seriesProviderIds.ContainsKey(MetadataProviders.Zap2It.ToString()); } /// From a2462704d111095d57838b78694d755f298b890c Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Thu, 12 Dec 2019 17:48:41 +0100 Subject: [PATCH 3/3] Add self to Jellyfin contributors --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f22944a8b6..d69e6330bb 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -30,6 +30,7 @@ - [Khinenw](https://github.com/HelloWorld017) - [fhriley](https://github.com/fhriley) - [nevado](https://github.com/nevado) + - [mark-monteiro](https://github.com/mark-monteiro) # Emby Contributors