update translations

This commit is contained in:
Luke Pulverenti
2014-11-28 21:40:46 -05:00
parent 3c8c6abca7
commit 97ece5bd6f
63 changed files with 252 additions and 95 deletions

View File

@@ -1073,6 +1073,11 @@ namespace MediaBrowser.Controller.Entities
throw new ArgumentNullException("user");
}
if (!IsVisibleViaTags(user))
{
return false;
}
var maxAllowedRating = user.Configuration.MaxParentalRating;
if (maxAllowedRating == null)
@@ -1103,6 +1108,21 @@ namespace MediaBrowser.Controller.Entities
return value.Value <= maxAllowedRating.Value;
}
private bool IsVisibleViaTags(User user)
{
var hasTags = this as IHasTags;
if (hasTags != null)
{
if (user.Configuration.BlockedTags.Any(i => hasTags.Tags.Contains(i, StringComparer.OrdinalIgnoreCase)))
{
return false;
}
}
return true;
}
/// <summary>
/// Gets the block unrated value.
/// </summary>