2
0
Эх сурвалжийг харах

remove tuner host enabled property

Luke Pulverenti 8 жил өмнө
parent
commit
2ff7608b7a

+ 2 - 2
Emby.Server.Implementations/LiveTv/LiveTvManager.cs

@@ -2750,7 +2750,7 @@ namespace Emby.Server.Implementations.LiveTv
 
 
         private bool IsLiveTvEnabled(User user)
         private bool IsLiveTvEnabled(User user)
         {
         {
-            return user.Policy.EnableLiveTvAccess && (Services.Count > 1 || GetConfiguration().TunerHosts.Count(i => i.IsEnabled) > 0);
+            return user.Policy.EnableLiveTvAccess && (Services.Count > 1 || GetConfiguration().TunerHosts.Count > 0);
         }
         }
 
 
         public IEnumerable<User> GetEnabledUsers()
         public IEnumerable<User> GetEnabledUsers()
@@ -2988,7 +2988,7 @@ namespace Emby.Server.Implementations.LiveTv
             if (string.Equals(feature, "dvr-l", StringComparison.OrdinalIgnoreCase))
             if (string.Equals(feature, "dvr-l", StringComparison.OrdinalIgnoreCase))
             {
             {
                 var config = GetConfiguration();
                 var config = GetConfiguration();
-                if (config.TunerHosts.Count(i => i.IsEnabled) > 0 &&
+                if (config.TunerHosts.Count > 0 &&
                     config.ListingProviders.Count(i => (i.EnableAllTuners || i.EnabledTuners.Length > 0) && string.Equals(i.Type, SchedulesDirect.TypeName, StringComparison.OrdinalIgnoreCase)) > 0)
                     config.ListingProviders.Count(i => (i.EnableAllTuners || i.EnabledTuners.Length > 0) && string.Equals(i.Type, SchedulesDirect.TypeName, StringComparison.OrdinalIgnoreCase)) > 0)
                 {
                 {
                     return Task.FromResult(new MBRegistrationRecord
                     return Task.FromResult(new MBRegistrationRecord

+ 1 - 1
Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs

@@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.LiveTv
 
 
         public bool IsHidden
         public bool IsHidden
         {
         {
-            get { return _liveTvManager.Services.Count == 1 && GetConfiguration().TunerHosts.Count(i => i.IsEnabled) == 0; }
+            get { return _liveTvManager.Services.Count == 1 && GetConfiguration().TunerHosts.Count == 0; }
         }
         }
 
 
         public bool IsEnabled
         public bool IsEnabled

+ 1 - 1
Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs

@@ -69,7 +69,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
         protected virtual List<TunerHostInfo> GetTunerHosts()
         protected virtual List<TunerHostInfo> GetTunerHosts()
         {
         {
             return GetConfiguration().TunerHosts
             return GetConfiguration().TunerHosts
-                .Where(i => i.IsEnabled && string.Equals(i.Type, Type, StringComparison.OrdinalIgnoreCase))
+                .Where(i => string.Equals(i.Type, Type, StringComparison.OrdinalIgnoreCase))
                 .ToList();
                 .ToList();
         }
         }
 
 

+ 1 - 6
Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs

@@ -215,7 +215,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
             var list = new List<LiveTvTunerInfo>();
             var list = new List<LiveTvTunerInfo>();
 
 
             foreach (var host in GetConfiguration().TunerHosts
             foreach (var host in GetConfiguration().TunerHosts
-                .Where(i => i.IsEnabled && string.Equals(i.Type, Type, StringComparison.OrdinalIgnoreCase)))
+                .Where(i => string.Equals(i.Type, Type, StringComparison.OrdinalIgnoreCase)))
             {
             {
                 try
                 try
                 {
                 {
@@ -605,11 +605,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
 
 
         public async Task Validate(TunerHostInfo info)
         public async Task Validate(TunerHostInfo info)
         {
         {
-            if (!info.IsEnabled)
-            {
-                return;
-            }
-
             lock (_modelCache)
             lock (_modelCache)
             {
             {
                 _modelCache.Clear();
                 _modelCache.Clear();

+ 0 - 1
MediaBrowser.Api/StartupWizardService.cs

@@ -188,7 +188,6 @@ namespace MediaBrowser.Api
                     // Add tuner
                     // Add tuner
                     await _liveTvManager.SaveTunerHost(new TunerHostInfo
                     await _liveTvManager.SaveTunerHost(new TunerHostInfo
                     {
                     {
-                        IsEnabled = true,
                         Type = request.LiveTvTunerType,
                         Type = request.LiveTvTunerType,
                         Url = request.LiveTvTunerPath
                         Url = request.LiveTvTunerPath
 
 

+ 0 - 2
MediaBrowser.Model/LiveTv/LiveTvOptions.cs

@@ -48,12 +48,10 @@ namespace MediaBrowser.Model.LiveTv
         public string DeviceId { get; set; }
         public string DeviceId { get; set; }
         public bool ImportFavoritesOnly { get; set; }
         public bool ImportFavoritesOnly { get; set; }
         public bool AllowHWTranscoding { get; set; }
         public bool AllowHWTranscoding { get; set; }
-        public bool IsEnabled { get; set; }
         public bool EnableTvgId { get; set; }
         public bool EnableTvgId { get; set; }
 
 
         public TunerHostInfo()
         public TunerHostInfo()
         {
         {
-            IsEnabled = true;
             AllowHWTranscoding = true;
             AllowHWTranscoding = true;
         }
         }
     }
     }