mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 23:13:06 +03:00
update translations
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user