update sorting

This commit is contained in:
Luke Pulverenti 2016-03-20 13:52:36 -04:00
parent 4b7093e923
commit fc6a270fb7
2 changed files with 4 additions and 5 deletions

View File

@ -916,11 +916,6 @@ namespace MediaBrowser.Controller.Entities
Logger.Debug("Query requires post-filtering due to ItemSortBy.Players");
return true;
}
if (query.SortBy.Contains(ItemSortBy.Random, StringComparer.OrdinalIgnoreCase))
{
Logger.Debug("Query requires post-filtering due to ItemSortBy.Random");
return true;
}
if (query.SortBy.Contains(ItemSortBy.Revenue, StringComparer.OrdinalIgnoreCase))
{
Logger.Debug("Query requires post-filtering due to ItemSortBy.Revenue");

View File

@ -1592,6 +1592,10 @@ namespace MediaBrowser.Server.Implementations.Persistence
{
return "RuntimeTicks";
}
if (string.Equals(name, ItemSortBy.Random, StringComparison.OrdinalIgnoreCase))
{
return "RANDOM()";
}
return name;
}