update user views

This commit is contained in:
Luke Pulverenti
2015-08-14 14:30:08 -04:00
parent 032891c9f3
commit 45c8f51a9c
6 changed files with 13 additions and 11 deletions

View File

@@ -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));

View File

@@ -141,12 +141,13 @@ namespace MediaBrowser.Server.Implementations.Library
if (user.Configuration.DisplayFoldersView)
{
list.Add(await GetUserView(new List<ICollectionFolder>(), 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))