Restrict people, genres, studios and artists to names backed by an item the user can access

This commit is contained in:
Shadowghost
2026-07-28 20:41:21 +02:00
parent 5f5c71ab75
commit 9a258c089d
11 changed files with 2003 additions and 8 deletions
@@ -496,6 +496,12 @@ namespace MediaBrowser.Controller.Entities
public IReadOnlyList<string> SubtitleLanguages { get; set; }
/// <summary>
/// Gets a value indicating whether some content in the library is hidden from <see cref="User"/>.
/// Filters that only exist to hide content can be skipped entirely when this is false.
/// </summary>
public bool UserHasContentRestrictions { get; private set; }
public void SetUser(User user)
{
var maxRating = user.MaxParentalRatingScore;
@@ -519,6 +525,7 @@ namespace MediaBrowser.Controller.Entities
.Select(tag => tag.RemoveDiacritics().ToLowerInvariant())
.ToArray();
UserHasContentRestrictions = user.HasContentRestrictions();
User = user;
}