update people sorting

This commit is contained in:
Luke Pulverenti
2015-07-14 15:04:16 -04:00
parent 7736bab314
commit 8c52c065fb
8 changed files with 236 additions and 613 deletions

View File

@@ -1,6 +1,7 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Querying;
using System;
namespace MediaBrowser.Server.Implementations.Sorting
{
@@ -17,6 +18,11 @@ namespace MediaBrowser.Server.Implementations.Sorting
/// <returns>System.Int32.</returns>
public int Compare(BaseItem x, BaseItem y)
{
if (!x.EnableAlphaNumericSorting || !y.EnableAlphaNumericSorting)
{
return string.Compare(x.SortName, y.SortName, StringComparison.CurrentCultureIgnoreCase);
}
return AlphanumComparator.CompareValues(x.SortName, y.SortName);
}