update sort names

pull/702/head
Luke Pulverenti 9 years ago
parent fa841e8610
commit 31e98681fa

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

@ -175,7 +175,7 @@ namespace MediaBrowser.Controller.Entities.TV
/// <returns>System.String.</returns>
protected override string CreateSortName()
{
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000-") : "")
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000 - ") : "")
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
}

@ -32,7 +32,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
private readonly ILocalizationManager _localization;
private readonly ITaskManager _taskManager;
public const int MigrationVersion = 20;
public const int MigrationVersion = 22;
public static bool EnableUnavailableMessage = false;
public CleanDatabaseScheduledTask(ILibraryManager libraryManager, IItemRepository itemRepo, ILogger logger, IServerConfigurationManager config, IFileSystem fileSystem, IHttpServer httpServer, ILocalizationManager localization, ITaskManager taskManager)

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

Loading…
Cancel
Save