Fix allow and block queries (#14482)

This commit is contained in:
theguymadmax
2025-07-27 21:28:04 -04:00
committed by GitHub
parent ba54cda774
commit 536437bbe3
2 changed files with 19 additions and 12 deletions

View File

@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Diacritics.Extensions;
using Jellyfin.Data;
using Jellyfin.Data.Enums;
using Jellyfin.Database.Implementations.Entities;
@@ -373,8 +374,15 @@ namespace MediaBrowser.Controller.Entities
.Where(i => i != other)
.Select(e => Enum.Parse<UnratedItem>(e, true)).ToArray();
ExcludeInheritedTags = user.GetPreference(PreferenceKind.BlockedTags);
IncludeInheritedTags = user.GetPreference(PreferenceKind.AllowedTags);
ExcludeInheritedTags = user.GetPreference(PreferenceKind.BlockedTags)
.Where(tag => !string.IsNullOrWhiteSpace(tag))
.Select(tag => tag.RemoveDiacritics().ToLowerInvariant())
.ToArray();
IncludeInheritedTags = user.GetPreference(PreferenceKind.AllowedTags)
.Where(tag => !string.IsNullOrWhiteSpace(tag))
.Select(tag => tag.RemoveDiacritics().ToLowerInvariant())
.ToArray();
User = user;
}