Fix TV shows and movies listing - add default alphabetical ordering

This commit is contained in:
2026-03-07 10:11:07 -05:00
parent a1c9488c6c
commit 3c5f94c242
@@ -204,6 +204,12 @@ namespace MediaBrowser.Controller.Entities
query.IncludeItemTypes = new[] { BaseItemKind.Movie };
// Ensure alphabetical ordering if not specified
if (query.OrderBy.Count == 0)
{
query.OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) };
}
return _libraryManager.GetItemsResult(query);
}
@@ -372,6 +378,12 @@ namespace MediaBrowser.Controller.Entities
query.IncludeItemTypes = new[] { BaseItemKind.Series };
// Ensure alphabetical ordering if not specified
if (query.OrderBy.Count == 0)
{
query.OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) };
}
return _libraryManager.GetItemsResult(query);
}