From 3c82d8540bffd9ae63a806e8a7a899cd5e142991 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 29 May 2017 20:44:48 -0400 Subject: update sortname generation --- MediaBrowser.Controller/Entities/BaseItem.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs') diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 603e59338c..c5422fce9c 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -689,14 +689,22 @@ namespace MediaBrowser.Controller.Entities return System.IO.Path.Combine(basePath, idString.Substring(0, 2), idString); } + protected string CreateSortName() + { + if (string.IsNullOrWhiteSpace(Name)) + { + return null; + } + + return CreateSortNameInternal(); + } + /// /// Creates the name of the sort. /// /// System.String. - protected virtual string CreateSortName() + protected virtual string CreateSortNameInternal() { - if (Name == null) return null; //some items may not have name filled in properly - if (!EnableAlphaNumericSorting) { return Name.TrimStart(); -- cgit v1.2.3