diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-10-11 18:16:42 +0200 |
|---|---|---|
| committer | Bond_009 <Bond.009@outlook.com> | 2019-10-29 17:56:06 +0100 |
| commit | 10ae815bb492288fbf05576bdbe4f0b531872a34 (patch) | |
| tree | e6d14d73770a16fa42e5ab7d1e42fcf1b5e9ad1d /MediaBrowser.Providers | |
| parent | 016be02cd68aa0a09270d93b8df782d012f8a478 (diff) | |
Address comments
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 c6199399d..37d1230e2 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 8b5e6aaba..574f6cd63 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); |
