mirror of https://github.com/jellyfin/jellyfin.git
remove tuner host enabled property
This commit is contained in:
parent
f05dc08c06
commit
2ff7608b7a
|
@ -2750,7 +2750,7 @@ namespace Emby.Server.Implementations.LiveTv
|
|||
|
||||
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()
|
||||
|
@ -2988,7 +2988,7 @@ namespace Emby.Server.Implementations.LiveTv
|
|||
if (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 MBRegistrationRecord
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.LiveTv
|
|||
|
||||
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
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|||
protected 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();
|
||||
}
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||
var 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.HdHomerun
|
|||
|
||||
public async Task Validate(TunerHostInfo info)
|
||||
{
|
||||
if (!info.IsEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lock (_modelCache)
|
||||
{
|
||||
_modelCache.Clear();
|
||||
|
|
|
@ -188,7 +188,6 @@ namespace MediaBrowser.Api
|
|||
// Add tuner
|
||||
await _liveTvManager.SaveTunerHost(new TunerHostInfo
|
||||
{
|
||||
IsEnabled = true,
|
||||
Type = request.LiveTvTunerType,
|
||||
Url = request.LiveTvTunerPath
|
||||
|
||||
|
|
|
@ -48,12 +48,10 @@ namespace MediaBrowser.Model.LiveTv
|
|||
public 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue