diff --git a/src/Jellyfin.Extensions/Json/Converters/JsonFlagEnumConverter.cs b/src/Jellyfin.Extensions/Json/Converters/JsonFlagEnumConverter.cs
index 6e4c85c474..4fa91fa5e1 100644
--- a/src/Jellyfin.Extensions/Json/Converters/JsonFlagEnumConverter.cs
+++ b/src/Jellyfin.Extensions/Json/Converters/JsonFlagEnumConverter.cs
@@ -9,9 +9,9 @@ namespace Jellyfin.Extensions.Json.Converters;
///
/// The type of enum.
public class JsonFlagEnumConverter : JsonConverter
- where T : Enum
+ where T : struct, Enum
{
- private static readonly T[] _enumValues = (T[])Enum.GetValues(typeof(T));
+ private static readonly T[] _enumValues = Enum.GetValues();
///
public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)