Selaa lähdekoodia

restore channel view setting

Luke Pulverenti 9 vuotta sitten
vanhempi
sitoutus
6003ba4c58

+ 1 - 0
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; }
 
         /// <summary>
         /// Initializes a new instance of the <see cref="UserConfiguration" /> class.

+ 8 - 1
MediaBrowser.Server.Implementations/Library/UserViewManager.cs

@@ -124,7 +124,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))
                 {