aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Entities/Libraries/CustomItemMetadata.cs
blob: f0daedfbe8e5ba2db6bb8a5a1baa3fc19415bea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;

namespace Jellyfin.Data.Entities.Libraries
{
    /// <summary>
    /// An entity containing metadata for a custom item.
    /// </summary>
    public class CustomItemMetadata : ItemMetadata
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CustomItemMetadata"/> class.
        /// </summary>
        /// <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)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            item.CustomItemMetadata.Add(this);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CustomItemMetadata"/> class.
        /// </summary>
        /// <remarks>
        /// Default constructor. Protected due to required properties, but present because EF needs it.
        /// </remarks>
        protected CustomItemMetadata()
        {
        }
    }
}