diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-07-14 15:04:16 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-07-14 15:04:16 -0400 |
| commit | 8c52c065fbb8d59c8830e3737f177f456d646b3e (patch) | |
| tree | 02779c1e628a2510f712c5c358a04edaa123d9ab /MediaBrowser.Controller/Entities/BaseItem.cs | |
| parent | 7736bab31400073daa64df3d4b283c26fcb9ee3e (diff) | |
update people sorting
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index abd6e4262..d9dbf265f 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -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)); |
