The Free Software Media System - Server Backend & API
Backport pull request #15950 from jellyfin/release-10.11.z
theguymadmaxd270957c8254
diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.csindex 427c2995bc..6396631f99 100644--- a/MediaBrowser.Controller/Entities/TV/Series.cs+++ b/MediaBrowser.Controller/Entities/TV/Series.cs@@ -214,7 +214,7 @@ namespace MediaBrowser.Controller.Entities.TVquery.AncestorWithPresentationUniqueKey = null;query.SeriesPresentationUniqueKey = seriesKey;query.IncludeItemTypes = new[] { BaseItemKind.Season };- query.OrderBy = new[] { (ItemSortBy.IndexNumber, SortOrder.Ascending) };+ query.OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) };if (user is not null && !user.DisplayMissingEpisodes){@@ -247,6 +247,10 @@ namespace MediaBrowser.Controller.Entities.TVquery.AncestorWithPresentationUniqueKey = null;query.SeriesPresentationUniqueKey = seriesKey;+ if (query.OrderBy.Count == 0)+ {+ query.OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) };+ }if (query.IncludeItemTypes.Length == 0){