resolve AVG false positives

This commit is contained in:
Luke Pulverenti
2015-04-14 23:41:29 -04:00
parent 639d8d360f
commit b576ac12dd
16 changed files with 55 additions and 31 deletions

View File

@@ -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);
}