diff options
Diffstat (limited to 'MediaBrowser.Providers')
| -rw-r--r-- | MediaBrowser.Providers/Subtitles/SubtitleManager.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Providers/TV/DummySeasonProvider.cs | 24 |
2 files changed, 17 insertions, 9 deletions
diff --git a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs index c6199399de..37d1230e23 100644 --- a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs +++ b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs @@ -54,7 +54,7 @@ namespace MediaBrowser.Providers.Subtitles public void AddParts(IEnumerable<ISubtitleProvider> subtitleProviders) { _subtitleProviders = subtitleProviders - .OrderBy(i => !(i is IHasOrder hasOrder) ? 0 : hasOrder.Order) + .OrderBy(i => i is IHasOrder hasOrder ? hasOrder.Order : 0) .ToArray(); } diff --git a/MediaBrowser.Providers/TV/DummySeasonProvider.cs b/MediaBrowser.Providers/TV/DummySeasonProvider.cs index 8b5e6aabab..574f6cd632 100644 --- a/MediaBrowser.Providers/TV/DummySeasonProvider.cs +++ b/MediaBrowser.Providers/TV/DummySeasonProvider.cs @@ -127,14 +127,22 @@ namespace MediaBrowser.Providers.TV bool isVirtualItem, CancellationToken cancellationToken) { - var seasonName = seasonNumber == 0 - ? _libraryManager.GetLibraryOptions(series).SeasonZeroDisplayName - : (seasonNumber.HasValue - ? string.Format( - CultureInfo.InvariantCulture, - _localization.GetLocalizedString("NameSeasonNumber"), - seasonNumber.Value) - : _localization.GetLocalizedString("NameSeasonUnknown")); + string seasonName; + if (seasonNumber == null) + { + seasonName =_localization.GetLocalizedString("NameSeasonUnknown") + } + else if (seasonNumber == 0) + { + seasonName = _libraryManager.GetLibraryOptions(series).SeasonZeroDisplayName; + } + else + { + seasonName = string.Format( + CultureInfo.InvariantCulture, + _localization.GetLocalizedString("NameSeasonNumber"), + seasonNumber.Value); + } _logger.LogInformation("Creating Season {0} entry for {1}", seasonName, series.Name); |
