The Free Software Media System - Server Backend & API
remove tuner host enabled property
Luke Pulverenti2ff7608b7ad2
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.csindex fc2e0ce720..7904024bf4 100644--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs@@ -2750,7 +2750,7 @@ namespace Emby.Server.Implementations.LiveTvprivate 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()@@ -2988,7 +2988,7 @@ namespace Emby.Server.Implementations.LiveTvif (string.Equals(feature, "dvr-l", StringComparison.OrdinalIgnoreCase)){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){return Task.FromResult(new MBRegistrationRecorddiff --git a/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.csindex f2806292d0..5582d8f35e 100644--- a/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs+++ b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs@@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.LiveTvpublic 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 IsEnableddiff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.csindex 5ac3812b0a..79fa9bb61f 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs@@ -69,7 +69,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHostsprotected virtual List<TunerHostInfo> GetTunerHosts(){return GetConfiguration().TunerHosts- .Where(i => i.IsEnabled && string.Equals(i.Type, Type, StringComparison.OrdinalIgnoreCase))+ .Where(i => string.Equals(i.Type, Type, StringComparison.OrdinalIgnoreCase)).ToList();}diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.csindex 6b80cec198..dbcabd1742 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs@@ -215,7 +215,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerunvar list = new List<LiveTvTunerInfo>();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{@@ -605,11 +605,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerunpublic async Task Validate(TunerHostInfo info){- if (!info.IsEnabled)- {- return;- }-lock (_modelCache){_modelCache.Clear();diff --git a/MediaBrowser.Api/StartupWizardService.cs b/MediaBrowser.Api/StartupWizardService.csindex 02154b98de..0155ef31bf 100644--- a/MediaBrowser.Api/StartupWizardService.cs+++ b/MediaBrowser.Api/StartupWizardService.cs@@ -188,7 +188,6 @@ namespace MediaBrowser.Api// Add tunerawait _liveTvManager.SaveTunerHost(new TunerHostInfo{- IsEnabled = true,Type = request.LiveTvTunerType,Url = request.LiveTvTunerPathdiff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.csindex 79a484a467..c595f9cea2 100644--- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs+++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs@@ -48,12 +48,10 @@ namespace MediaBrowser.Model.LiveTvpublic string DeviceId { get; set; }public bool ImportFavoritesOnly { get; set; }public bool AllowHWTranscoding { get; set; }- public bool IsEnabled { get; set; }public bool EnableTvgId { get; set; }public TunerHostInfo(){- IsEnabled = true;AllowHWTranscoding = true;}}