diff options
Diffstat (limited to 'MediaBrowser.Controller/Entities/TV/Episode.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Episode.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index 15b721fe6..3f30ac565 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -136,7 +136,7 @@ namespace MediaBrowser.Controller.Entities.TV public string FindSeriesSortName() { var series = Series; - return series == null ? SeriesName : series.SortName; + return series is null ? SeriesName : series.SortName; } public override double GetDefaultPrimaryImageAspectRatio() @@ -155,7 +155,7 @@ namespace MediaBrowser.Controller.Entities.TV var list = base.GetUserDataKeys(); var series = Series; - if (series != null && ParentIndexNumber.HasValue && IndexNumber.HasValue) + if (series is not null && ParentIndexNumber.HasValue && IndexNumber.HasValue) { var seriesUserDataKeys = series.GetUserDataKeys(); var take = seriesUserDataKeys.Count; @@ -181,14 +181,14 @@ namespace MediaBrowser.Controller.Entities.TV public string FindSeriesPresentationUniqueKey() { var series = Series; - return series == null ? null : series.PresentationUniqueKey; + return series is null ? null : series.PresentationUniqueKey; } public string FindSeasonName() { var season = Season; - if (season == null) + if (season is null) { if (ParentIndexNumber.HasValue) { @@ -204,7 +204,7 @@ namespace MediaBrowser.Controller.Entities.TV public string FindSeriesName() { var series = Series; - return series == null ? SeriesName : series.Name; + return series is null ? SeriesName : series.Name; } public Guid FindSeasonId() @@ -212,11 +212,11 @@ namespace MediaBrowser.Controller.Entities.TV var season = FindParent<Season>(); // Episodes directly in series folder - if (season == null) + if (season is null) { var series = Series; - if (series != null && ParentIndexNumber.HasValue) + if (series is not null && ParentIndexNumber.HasValue) { var findNumber = ParentIndexNumber.Value; @@ -226,7 +226,7 @@ namespace MediaBrowser.Controller.Entities.TV } } - return season == null ? Guid.Empty : season.Id; + return season is null ? Guid.Empty : season.Id; } /// <summary> @@ -235,8 +235,8 @@ namespace MediaBrowser.Controller.Entities.TV /// <returns>System.String.</returns> protected override string CreateSortName() { - return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000 - ", CultureInfo.InvariantCulture) : string.Empty) - + (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ", CultureInfo.InvariantCulture) : string.Empty) + Name; + return (ParentIndexNumber is not null ? ParentIndexNumber.Value.ToString("000 - ", CultureInfo.InvariantCulture) : string.Empty) + + (IndexNumber is not null ? IndexNumber.Value.ToString("0000 - ", CultureInfo.InvariantCulture) : string.Empty) + Name; } /// <summary> @@ -262,7 +262,7 @@ namespace MediaBrowser.Controller.Entities.TV public Guid FindSeriesId() { var series = FindParent<Series>(); - return series == null ? Guid.Empty : series.Id; + return series is null ? Guid.Empty : series.Id; } public override IEnumerable<Guid> GetAncestorIds() @@ -302,7 +302,7 @@ namespace MediaBrowser.Controller.Entities.TV var series = Series; - if (series != null) + if (series is not null) { id.SeriesProviderIds = series.ProviderIds; id.SeriesDisplayOrder = series.DisplayOrder; |
