aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/UserViewManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserViewManager.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
index 0d54d94e8..e3ac2025f 100644
--- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
@@ -93,7 +93,7 @@ namespace MediaBrowser.Server.Implementations.Library
if (user.Configuration.DisplayCollectionsView &&
recursiveChildren.OfType<BoxSet>().Any())
{
- list.Add(await GetUserView(CollectionType.BoxSets, user, CollectionType.BoxSets, cancellationToken).ConfigureAwait(false));
+ list.Add(await GetUserView(CollectionType.BoxSets, user, string.Empty, cancellationToken).ConfigureAwait(false));
}
if (recursiveChildren.OfType<Playlist>().Any())
@@ -101,6 +101,11 @@ namespace MediaBrowser.Server.Implementations.Library
list.Add(_playlists.GetPlaylistsFolder(user.Id.ToString("N")));
}
+ if (user.Configuration.DisplayFoldersView)
+ {
+ list.Add(await GetUserView(CollectionType.Folders, user, "zz_" + CollectionType.Folders, cancellationToken).ConfigureAwait(false));
+ }
+
if (query.IncludeExternalContent)
{
var channelResult = await _channelManager.GetChannels(new ChannelQuery
@@ -131,7 +136,7 @@ namespace MediaBrowser.Server.Implementations.Library
return _libraryManager.Sort(list, user, new[] { ItemSortBy.SortName }, SortOrder.Ascending).Cast<Folder>();
}
- private Task<UserView> GetUserView(string type, User user, string sortName, CancellationToken cancellationToken)
+ public Task<UserView> GetUserView(string type, User user, string sortName, CancellationToken cancellationToken)
{
var name = _localizationManager.GetLocalizedString("ViewType" + type);