diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-09-05 15:45:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-05 15:45:56 +0200 |
| commit | 43e360ab7f523b7bb7aa3ad2e6f3221f0b773b10 (patch) | |
| tree | 037dbcbfb2e9afb02bd65cb16083d47face04c9a | |
| parent | e6c22a97076b751eaf817ba7caa013ebe39fb7a7 (diff) | |
| parent | 76172f76d9747246f88d087ea7843448ea70ff16 (diff) | |
Merge pull request #4054 from lmaonator/fix_tvdb_absolute_order
Fix TVDB plugin not handling absolute display order
| -rw-r--r-- | CONTRIBUTORS.md | 1 | ||||
| -rw-r--r-- | MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e383d02b7..f0724b412 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -57,6 +57,7 @@ - [Larvitar](https://github.com/Larvitar) - [LeoVerto](https://github.com/LeoVerto) - [Liggy](https://github.com/Liggy) + - [lmaonator](https://github.com/lmaonator) - [LogicalPhallacy](https://github.com/LogicalPhallacy) - [loli10K](https://github.com/loli10K) - [lostmypillow](https://github.com/lostmypillow) diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs index 07167bda6..c088d8cec 100644 --- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs +++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs @@ -154,6 +154,13 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb item.IndexNumber = Convert.ToInt32(episode.DvdEpisodeNumber ?? episode.AiredEpisodeNumber); item.ParentIndexNumber = episode.DvdSeason ?? episode.AiredSeason; } + else if (string.Equals(id.SeriesDisplayOrder, "absolute", StringComparison.OrdinalIgnoreCase)) + { + if (episode.AbsoluteNumber.GetValueOrDefault() != 0) + { + item.IndexNumber = episode.AbsoluteNumber; + } + } else if (episode.AiredEpisodeNumber.HasValue) { item.IndexNumber = episode.AiredEpisodeNumber; |
