Used enum value for ItemValueType

This commit is contained in:
JPVenson
2024-10-09 23:55:28 +00:00
parent 4c86642c00
commit fe9c96d052
4 changed files with 77 additions and 58 deletions

View File

@@ -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.

View File

@@ -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,
}