remove some usage of ActiveService

pull/702/head
Luke Pulverenti 9 years ago
parent 7dc19a8262
commit 028a0a857a

@ -14,12 +14,6 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
public interface ILiveTvManager
{
/// <summary>
/// Gets the active service.
/// </summary>
/// <value>The active service.</value>
ILiveTvService ActiveService { get; }
/// <summary>
/// Gets the services.
/// </summary>

@ -1843,15 +1843,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
private bool IsLiveTvEnabled(User user)
{
return user.Policy.EnableLiveTvAccess && ActiveService != null;
return user.Policy.EnableLiveTvAccess && Services.Count > 0;
}
public IEnumerable<User> GetEnabledUsers()
{
var service = ActiveService;
return _userManager.Users
.Where(i => i.Policy.EnableLiveTvAccess && service != null);
.Where(IsLiveTvEnabled);
}
/// <summary>

@ -52,7 +52,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
public bool IsHidden
{
get { return _liveTvManager.ActiveService == null; }
get { return _liveTvManager.Services.Count == 0; }
}
public bool IsEnabled

Loading…
Cancel
Save