From 18e6cd429ae026d87259eb05c45bf049616235dc Mon Sep 17 00:00:00 2001 From: SenorSmartyPants Date: Sat, 22 Jun 2019 16:11:47 -0500 Subject: [PATCH 1/2] Update TVDB provider to search based on series display order --- .../TV/TheTVDB/TvDbClientManager.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs b/MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs index 1d1fbd00f..9fd72b65c 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs @@ -158,8 +158,20 @@ namespace MediaBrowser.Providers.TV.TheTVDB // Prefer SxE over premiere date as it is more robust if (searchInfo.IndexNumber.HasValue && searchInfo.ParentIndexNumber.HasValue) { - episodeQuery.AiredEpisode = searchInfo.IndexNumber.Value; - episodeQuery.AiredSeason = searchInfo.ParentIndexNumber.Value; + switch (searchInfo.SeriesDisplayOrder) + { + case "dvd": + episodeQuery.DvdEpisode = searchInfo.IndexNumber.Value; + episodeQuery.DvdSeason = searchInfo.ParentIndexNumber.Value; + break; + case "absolute": + episodeQuery.AbsoluteNumber = searchInfo.IndexNumber.Value; + break; + default: //aired order + episodeQuery.AiredEpisode = searchInfo.IndexNumber.Value; + episodeQuery.AiredSeason = searchInfo.ParentIndexNumber.Value; + break; + } } else if (searchInfo.PremiereDate.HasValue) { From cf0460c7f98938109cb63cd029dc35981d7b0496 Mon Sep 17 00:00:00 2001 From: dkanada Date: Wed, 7 Aug 2019 02:24:56 -0700 Subject: [PATCH 2/2] move comment to separate line --- MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs b/MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs index 9fd72b65c..3dcfba26a 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvDbClientManager.cs @@ -167,7 +167,8 @@ namespace MediaBrowser.Providers.TV.TheTVDB case "absolute": episodeQuery.AbsoluteNumber = searchInfo.IndexNumber.Value; break; - default: //aired order + default: + //aired order episodeQuery.AiredEpisode = searchInfo.IndexNumber.Value; episodeQuery.AiredSeason = searchInfo.ParentIndexNumber.Value; break;