aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Channels
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-04-14 23:41:29 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-04-14 23:41:29 -0400
commitb576ac12dd7f062eb6c75d31bf064966e71d07e6 (patch)
tree1374f76bd5b0bbce3da022467ca14b4a4104f8a2 /MediaBrowser.Controller/Channels
parent639d8d360f6a515d98255803df79a820d60b8cff (diff)
resolve AVG false positives
Diffstat (limited to 'MediaBrowser.Controller/Channels')
-rw-r--r--MediaBrowser.Controller/Channels/Channel.cs16
1 files changed, 13 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs
index f746d87ff..f0328a1d8 100644
--- a/MediaBrowser.Controller/Channels/Channel.cs
+++ b/MediaBrowser.Controller/Channels/Channel.cs
@@ -14,11 +14,21 @@ namespace MediaBrowser.Controller.Channels
public override bool IsVisible(User user)
{
- if (!user.Policy.EnableAllChannels && !user.Policy.EnabledChannels.Contains(Id.ToString("N"), StringComparer.OrdinalIgnoreCase))
+ if (user.Policy.BlockedChannels != null)
{
- return false;
+ if (user.Policy.BlockedChannels.Contains(Id.ToString("N"), StringComparer.OrdinalIgnoreCase))
+ {
+ return false;
+ }
}
-
+ else
+ {
+ if (!user.Policy.EnableAllChannels && !user.Policy.EnabledChannels.Contains(Id.ToString("N"), StringComparer.OrdinalIgnoreCase))
+ {
+ return false;
+ }
+ }
+
return base.IsVisible(user);
}