diff options
| author | JPVenson <github@jpb.email> | 2024-10-09 23:55:28 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.email> | 2024-10-09 23:55:28 +0000 |
| commit | fe9c96d052d6815f0d32833711a865c2f33d9999 (patch) | |
| tree | 861848d588bdc03aad62bf47eceddeff6ef969e6 /Jellyfin.Data | |
| parent | 4c86642c006d768c672de07f0efb40efb462ea24 (diff) | |
Used enum value for ItemValueType
Diffstat (limited to 'Jellyfin.Data')
| -rw-r--r-- | Jellyfin.Data/Entities/ItemValue.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/ItemValueType.cs | 41 |
2 files changed, 42 insertions, 1 deletions
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 /// <summary> /// Gets or Sets the Type. /// </summary> - public required int Type { get; set; } + public required ItemValueType Type { get; set; } /// <summary> /// 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; + +/// <summary> +/// Provides the Value types for an <see cref="ItemValue"/>. +/// </summary> +#pragma warning disable CA1027 // Mark enums with FlagsAttribute +public enum ItemValueType +#pragma warning restore CA1027 // Mark enums with FlagsAttribute +{ + /// <summary> + /// Artists. + /// </summary> +#pragma warning disable CA1008 // Enums should have zero value. Cannot apply here. + Artist = 0, +#pragma warning restore CA1008 // Enums should have zero value + + /// <summary> + /// Album. + /// </summary> + AlbumArtist = 1, + + /// <summary> + /// Genre. + /// </summary> + Genre = 2, + + /// <summary> + /// Studios. + /// </summary> + Studios = 3, + + /// <summary> + /// Tags. + /// </summary> + Tags = 4, + + /// <summary> + /// InheritedTags. + /// </summary> + InheritedTags = 6, +} |
