From f0adb2e89173ae0a9b041dfaa45edca119bc7f4a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 27 Jan 2016 14:28:12 -0500 Subject: [PATCH] restore channel view setting --- MediaBrowser.Model/Configuration/UserConfiguration.cs | 1 + .../Library/UserViewManager.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs index ab3a861a3..819948909 100644 --- a/MediaBrowser.Model/Configuration/UserConfiguration.cs +++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs @@ -48,6 +48,7 @@ namespace MediaBrowser.Model.Configuration public string[] PlainFolderViews { get; set; } public bool HidePlayedInLatest { get; set; } + public bool DisplayChannelsInline { get; set; } /// /// Initializes a new instance of the class. diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs index 30a720a62..0df4742bd 100644 --- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs @@ -163,7 +163,14 @@ namespace MediaBrowser.Server.Implementations.Library var channels = channelResult.Items; - list.AddRange(channels); + if (user.Configuration.DisplayChannelsInline && channels.Length > 0) + { + list.Add(await _channelManager.GetInternalChannelFolder(cancellationToken).ConfigureAwait(false)); + } + else + { + list.AddRange(channels); + } if (_liveTvManager.GetEnabledUsers().Select(i => i.Id.ToString("N")).Contains(query.UserId)) {