浏览代码

update sorting

Luke Pulverenti 9 年之前
父节点
当前提交
66d0815fc6

+ 5 - 5
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -494,11 +494,6 @@ namespace MediaBrowser.Controller.Entities
         {
             get
             {
-                if (!string.IsNullOrWhiteSpace(ForcedSortName))
-                {
-                    return ForcedSortName;
-                }
-
                 return _sortName ?? (_sortName = CreateSortName());
             }
             set
@@ -534,6 +529,11 @@ namespace MediaBrowser.Controller.Entities
         /// <returns>System.String.</returns>
         protected virtual string CreateSortName()
         {
+            if (!string.IsNullOrWhiteSpace(ForcedSortName))
+            {
+                return ModifySortChunks(ForcedSortName);
+            }
+
             if (Name == null) return null; //some items may not have name filled in properly
 
             if (!EnableAlphaNumericSorting)

+ 1 - 1
MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs

@@ -79,7 +79,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
 
         private IDbCommand _updateInheritedRatingCommand;
 
-        private const int LatestSchemaVersion = 50;
+        private const int LatestSchemaVersion = 51;
 
         /// <summary>
         /// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.