Merge pull request #1484 from SenorSmartyPants/DVD-Order

Update TVDB provider to search based on series display order
pull/1588/head
dkanada 5 years ago committed by GitHub
commit 4f592e9c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -162,8 +162,21 @@ namespace MediaBrowser.Providers.TV.TheTVDB
// Prefer SxE over premiere date as it is more robust // Prefer SxE over premiere date as it is more robust
if (searchInfo.IndexNumber.HasValue && searchInfo.ParentIndexNumber.HasValue) if (searchInfo.IndexNumber.HasValue && searchInfo.ParentIndexNumber.HasValue)
{ {
episodeQuery.AiredEpisode = searchInfo.IndexNumber.Value; switch (searchInfo.SeriesDisplayOrder)
episodeQuery.AiredSeason = searchInfo.ParentIndexNumber.Value; {
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) else if (searchInfo.PremiereDate.HasValue)
{ {

Loading…
Cancel
Save