aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-03-12 10:59:08 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-03-12 10:59:08 -0400
commit028a0a857ab6d7f42544e2ae3a3f79f5632844fc (patch)
tree4a8bb3e7fe99f6795645e916a32ce40601cf31d2
parent7dc19a826259f3936abf7319908156dc3dbde36a (diff)
remove some usage of ActiveService
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs6
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs6
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs2
3 files changed, 3 insertions, 11 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index fcd973ec2..9b36454d2 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -15,12 +15,6 @@ namespace MediaBrowser.Controller.LiveTv
public interface ILiveTvManager
{
/// <summary>
- /// Gets the active service.
- /// </summary>
- /// <value>The active service.</value>
- ILiveTvService ActiveService { get; }
-
- /// <summary>
/// Gets the services.
/// </summary>
/// <value>The services.</value>
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index 337bba6a2..14a2b08a7 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -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>
diff --git a/MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs b/MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs
index 05cbfede0..de2351434 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs
@@ -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