diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/UserViewManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/UserViewManager.cs | 17 |
1 files changed, 9 insertions, 8 deletions
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<Series>().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<MusicAlbum>().Any() || recursiveChildren.OfType<MusicVideo>().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<Movie>().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<Game>().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<BoxSet>().Any()) + if (user.Configuration.DisplayCollectionsView || + recursiveChildren.OfType<BoxSet>().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<UserView> GetUserView(string type, User user, CancellationToken cancellationToken) + private Task<UserView> 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); } } } |
