Fix TV shows and movies listing - add default alphabetical ordering
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user