aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Channels/Channel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Channels/Channel.cs')
-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);
}