jellyfin/Jellyfin.Data/Entities/Libraries/CustomItemMetadata.cs

37 lines
1.2 KiB
C#
Raw Normal View History

using System;
2020-08-29 13:30:09 -04:00
namespace Jellyfin.Data.Entities.Libraries
{
/// <summary>
/// An entity containing metadata for a custom item.
/// </summary>
public class CustomItemMetadata : Metadata
2020-05-02 17:56:05 -04:00
{
/// <summary>
/// Initializes a new instance of the <see cref="CustomItemMetadata"/> class.
2020-05-02 17:56:05 -04:00
/// </summary>
2020-06-19 06:21:49 -04:00
/// <param name="title">The title or name of the object.</param>
/// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="item">The item.</param>
public CustomItemMetadata(string title, string language, CustomItem item) : base(title, language)
2020-05-02 17:56:05 -04:00
{
if (item == null)
2020-06-20 04:35:29 -04:00
{
throw new ArgumentNullException(nameof(item));
2020-06-20 04:35:29 -04:00
}
item.CustomItemMetadata.Add(this);
2020-05-02 17:56:05 -04:00
}
2020-05-02 17:56:05 -04:00
/// <summary>
/// Initializes a new instance of the <see cref="CustomItemMetadata"/> class.
2020-05-02 17:56:05 -04:00
/// </summary>
/// <remarks>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </remarks>
protected CustomItemMetadata()
2020-05-02 17:56:05 -04:00
{
}
}
}