aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Entities/Libraries/TrackMetadata.cs
blob: 321f93bf2ed1e3970d38d90cef70084611dd44c7 (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 holding metadata for a track.
    /// </summary>
    public class TrackMetadata : ItemMetadata
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TrackMetadata"/> 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="track">The track.</param>
        public TrackMetadata(string title, string language, Track track) : base(title, language)
        {
            if (track == null)
            {
                throw new ArgumentNullException(nameof(track));
            }

            track.TrackMetadata.Add(this);
        }

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