mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
update people sorting
This commit is contained in:
@@ -235,6 +235,15 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public virtual bool EnableAlphaNumericSorting
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is just a helper for convenience
|
||||
/// </summary>
|
||||
@@ -439,6 +448,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
if (Name == null) return null; //some items may not have name filled in properly
|
||||
|
||||
if (!EnableAlphaNumericSorting)
|
||||
{
|
||||
return Name.TrimStart();
|
||||
}
|
||||
|
||||
var sortable = Name.Trim().ToLower();
|
||||
sortable = ConfigurationManager.Configuration.SortRemoveCharacters.Aggregate(sortable, (current, search) => current.Replace(search.ToLower(), string.Empty));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user