aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoftworkz <softworkz@hotmail.com>2016-06-13 02:45:15 +0200
committersoftworkz <softworkz@hotmail.com>2016-06-22 22:43:31 +0200
commit874577ed8b6c4b591eeea63c23ed3f4687756a19 (patch)
tree0f2fa0d43da89f5fb8b8d68169f402785259fb2f
parentb0ed7ef0a3b78483291a742b5c333fce802e3f80 (diff)
Channel item sort must not default to name sorting when all sort fields are cleared
-rw-r--r--MediaBrowser.Server.Implementations/Channels/ChannelManager.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
index aac5ddcaf..0cdb76345 100644
--- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
+++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
@@ -1172,8 +1172,7 @@ namespace MediaBrowser.Server.Implementations.Channels
{
items = ApplyFilters(items, query.Filters, user);
- var sortBy = query.SortBy.Length == 0 ? new[] { ItemSortBy.SortName } : query.SortBy;
- items = _libraryManager.Sort(items, user, sortBy, query.SortOrder ?? SortOrder.Ascending);
+ items = _libraryManager.Sort(items, user, query.SortBy, query.SortOrder ?? SortOrder.Ascending);
var all = items.ToList();
var totalCount = totalCountFromProvider ?? all.Count;