From 43943657b7ea0c607f998c6397d3878e3fb05c5f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 1 Jul 2014 00:06:28 -0400 Subject: add additional view settings --- .../Library/UserViewManager.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/UserViewManager.cs') diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs index 9ac82690b..24e4f0ef4 100644 --- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs @@ -62,28 +62,29 @@ namespace MediaBrowser.Server.Implementations.Library if (recursiveChildren.OfType().Any()) { - list.Add(await GetUserView(CollectionType.TvShows, user, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.TvShows, user, string.Empty, cancellationToken).ConfigureAwait(false)); } if (recursiveChildren.OfType().Any() || recursiveChildren.OfType().Any()) { - list.Add(await GetUserView(CollectionType.Music, user, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.Music, user, string.Empty, cancellationToken).ConfigureAwait(false)); } if (recursiveChildren.OfType().Any()) { - list.Add(await GetUserView(CollectionType.Movies, user, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.Movies, user, string.Empty, cancellationToken).ConfigureAwait(false)); } if (recursiveChildren.OfType().Any()) { - list.Add(await GetUserView(CollectionType.Games, user, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.Games, user, string.Empty, cancellationToken).ConfigureAwait(false)); } - if (recursiveChildren.OfType().Any()) + if (user.Configuration.DisplayCollectionsView || + recursiveChildren.OfType().Any()) { - list.Add(await GetUserView(CollectionType.BoxSets, user, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.BoxSets, user, "zzz_" + CollectionType.BoxSets, cancellationToken).ConfigureAwait(false)); } if (query.IncludeExternalContent) @@ -116,11 +117,11 @@ namespace MediaBrowser.Server.Implementations.Library return list.OrderBy(i => i.SortName); } - private Task GetUserView(string type, User user, CancellationToken cancellationToken) + private Task GetUserView(string type, User user, string sortName, CancellationToken cancellationToken) { var name = _localizationManager.GetLocalizedString("ViewType" + type); - return _libraryManager.GetNamedView(name, type, string.Empty, cancellationToken); + return _libraryManager.GetNamedView(name, type, sortName, cancellationToken); } } } -- cgit v1.2.3