From 45c8f51a9c56471e2306ad6fd71ab4b51ee8047f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 14 Aug 2015 14:30:08 -0400 Subject: update user views --- MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 3 +-- .../Library/UserViewManager.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library') diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 1d2e5e322..c316aab25 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -1670,8 +1670,7 @@ namespace MediaBrowser.Server.Implementations.Library string sortName, CancellationToken cancellationToken) { - var path = Path.Combine(ConfigurationManager.ApplicationPaths.ItemsByNamePath, - "views"); + var path = Path.Combine(ConfigurationManager.ApplicationPaths.ItemsByNamePath, "views"); path = Path.Combine(path, _fileSystem.GetValidFilename(viewType)); diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs index c32dc0d41..5d753826a 100644 --- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs @@ -141,12 +141,13 @@ namespace MediaBrowser.Server.Implementations.Library if (user.Configuration.DisplayFoldersView) { - list.Add(await GetUserView(new List(), list, CollectionType.Folders, "zz_" + CollectionType.Folders, user, cancellationToken).ConfigureAwait(false)); + var name = _localizationManager.GetLocalizedString("ViewType" + CollectionType.Folders); + list.Add(await _libraryManager.GetNamedView(name, CollectionType.Folders, string.Empty, cancellationToken).ConfigureAwait(false)); } if (query.IncludeExternalContent) { - var channelResult = await _channelManager.GetChannels(new ChannelQuery + var channelResult = await _channelManager.GetChannelsInternal(new ChannelQuery { UserId = query.UserId @@ -155,14 +156,14 @@ namespace MediaBrowser.Server.Implementations.Library var channels = channelResult.Items; var embeddedChannels = channels - .Where(i => user.Configuration.DisplayChannelsWithinViews.Contains(i.Id)) + .Where(i => user.Configuration.DisplayChannelsWithinViews.Contains(i.Id.ToString("N"))) .ToList(); - list.AddRange(embeddedChannels.Select(i => _channelManager.GetChannel(i.Id))); + list.AddRange(embeddedChannels); if (channels.Length > embeddedChannels.Count) { - list.Add(await _channelManager.GetInternalChannelFolder(query.UserId, cancellationToken).ConfigureAwait(false)); + list.Add(await _channelManager.GetInternalChannelFolder(cancellationToken).ConfigureAwait(false)); } if (_liveTvManager.GetEnabledUsers().Select(i => i.Id.ToString("N")).Contains(query.UserId)) -- cgit v1.2.3