From fe9c96d052d6815f0d32833711a865c2f33d9999 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Wed, 9 Oct 2024 23:55:28 +0000 Subject: Used enum value for ItemValueType --- Jellyfin.Data/Entities/ItemValue.cs | 2 +- Jellyfin.Data/Entities/ItemValueType.cs | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 Jellyfin.Data/Entities/ItemValueType.cs (limited to 'Jellyfin.Data') diff --git a/Jellyfin.Data/Entities/ItemValue.cs b/Jellyfin.Data/Entities/ItemValue.cs index 78da478b1..bfa53cd46 100644 --- a/Jellyfin.Data/Entities/ItemValue.cs +++ b/Jellyfin.Data/Entities/ItemValue.cs @@ -23,7 +23,7 @@ public class ItemValue /// /// Gets or Sets the Type. /// - public required int Type { get; set; } + public required ItemValueType Type { get; set; } /// /// Gets or Sets the Value. diff --git a/Jellyfin.Data/Entities/ItemValueType.cs b/Jellyfin.Data/Entities/ItemValueType.cs new file mode 100644 index 000000000..006036b40 --- /dev/null +++ b/Jellyfin.Data/Entities/ItemValueType.cs @@ -0,0 +1,41 @@ +namespace Jellyfin.Data.Entities; + +/// +/// Provides the Value types for an . +/// +#pragma warning disable CA1027 // Mark enums with FlagsAttribute +public enum ItemValueType +#pragma warning restore CA1027 // Mark enums with FlagsAttribute +{ + /// + /// Artists. + /// +#pragma warning disable CA1008 // Enums should have zero value. Cannot apply here. + Artist = 0, +#pragma warning restore CA1008 // Enums should have zero value + + /// + /// Album. + /// + AlbumArtist = 1, + + /// + /// Genre. + /// + Genre = 2, + + /// + /// Studios. + /// + Studios = 3, + + /// + /// Tags. + /// + Tags = 4, + + /// + /// InheritedTags. + /// + InheritedTags = 6, +} -- cgit v1.2.3