aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ItemsController.cs
diff options
context:
space:
mode:
authorgnattu <gnattu@users.noreply.github.com>2024-05-01 03:32:49 +0800
committerGitHub <noreply@github.com>2024-04-30 13:32:49 -0600
commit5dc6bb4910cfdc7f40ad83d647172d743e6e0595 (patch)
tree6832f1398d67d5f43a75e171967879a81ed38744 /Jellyfin.Api/Controllers/ItemsController.cs
parent48bb16472f7ed62ee74c98a51dea3bf3ee135de2 (diff)
Fix incomplete tag query for whitelist tags (#11416)
Diffstat (limited to 'Jellyfin.Api/Controllers/ItemsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ItemsController.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs
index 6ffe6e7da..70f805336 100644
--- a/Jellyfin.Api/Controllers/ItemsController.cs
+++ b/Jellyfin.Api/Controllers/ItemsController.cs
@@ -256,6 +256,13 @@ public class ItemsController : BaseJellyfinApiController
return BadRequest("userId is required");
}
+ if (user is not null
+ && user.GetPreference(PreferenceKind.AllowedTags).Length != 0
+ && !fields.Contains(ItemFields.Tags))
+ {
+ fields = [..fields, ItemFields.Tags];
+ }
+
var dtoOptions = new DtoOptions { Fields = fields }
.AddClientFields(User)
.AddAdditionalDtoOptions(enableImages, enableUserData, imageTypeLimit, enableImageTypes);