Explorar o código

move channel view setting to global

Luke Pulverenti %!s(int64=8) %!d(string=hai) anos
pai
achega
3862207a73

+ 1 - 0
MediaBrowser.Model/Configuration/ServerConfiguration.cs

@@ -204,6 +204,7 @@ namespace MediaBrowser.Model.Configuration
         public bool DisplayCollectionsView { get; set; }
         public string[] LocalNetworkAddresses { get; set; }
         public string[] CodecsUsed { get; set; }
+        public bool EnableChannelView { get; set; }
 
         /// <summary>
         /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.

+ 0 - 1
MediaBrowser.Model/Configuration/UserConfiguration.cs

@@ -41,7 +41,6 @@ namespace MediaBrowser.Model.Configuration
         public string[] PlainFolderViews { get; set; }
 
         public bool HidePlayedInLatest { get; set; }
-        public bool EnableChannelView { get; set; }
 
         public bool RememberAudioSelections { get; set; }
         public bool RememberSubtitleSelections { get; set; }

+ 2 - 2
MediaBrowser.Server.Implementations/Library/UserViewManager.cs

@@ -120,8 +120,8 @@ namespace MediaBrowser.Server.Implementations.Library
                 }, cancellationToken).ConfigureAwait(false);
 
                 var channels = channelResult.Items;
-
-                if (user.Configuration.EnableChannelView && channels.Length > 0)
+                
+                if (_config.Configuration.EnableChannelView && channels.Length > 0)
                 {
                     list.Add(await _channelManager.GetInternalChannelFolder(cancellationToken).ConfigureAwait(false));
                 }