diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-11-17 10:28:39 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-17 10:28:39 -0500 |
| commit | f6ebdbc45e6dc455b7535dfe341ccba94b2c2a90 (patch) | |
| tree | 3b42753afda908633880519308fddc25bc249d71 /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | fc3d6278be89b695aa79dc61d7f1226d4d6e441b (diff) | |
| parent | 04a712ab1d56a29a31e2c4991c16d338348762f4 (diff) | |
Merge pull request #4456 from martinek-stepan/emby-namig-nullable
Emby.Naming - nullable & code coverage
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 8ab5e4aef..d83873441 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2486,9 +2486,10 @@ namespace Emby.Server.Implementations.Library var isFolder = episode.VideoType == VideoType.BluRay || episode.VideoType == VideoType.Dvd; + // TODO nullable - what are we trying to do there with empty episodeInfo? var episodeInfo = episode.IsFileProtocol - ? resolver.Resolve(episode.Path, isFolder, null, null, isAbsoluteNaming) ?? new Naming.TV.EpisodeInfo() - : new Naming.TV.EpisodeInfo(); + ? resolver.Resolve(episode.Path, isFolder, null, null, isAbsoluteNaming) ?? new Naming.TV.EpisodeInfo(episode.Path) + : new Naming.TV.EpisodeInfo(episode.Path); try { @@ -2577,12 +2578,12 @@ namespace Emby.Server.Implementations.Library if (!episode.IndexNumberEnd.HasValue || forceRefresh) { - if (episode.IndexNumberEnd != episodeInfo.EndingEpsiodeNumber) + if (episode.IndexNumberEnd != episodeInfo.EndingEpisodeNumber) { changed = true; } - episode.IndexNumberEnd = episodeInfo.EndingEpsiodeNumber; + episode.IndexNumberEnd = episodeInfo.EndingEpisodeNumber; } if (!episode.ParentIndexNumber.HasValue || forceRefresh) |
