jellyfin-server/Jellyfin.Data/Entities/Libraries/TrackMetadata.cs

37 lines
1.1 KiB
C#
Raw Normal View History

using System;
2020-08-29 17:30:09 +00:00
namespace Jellyfin.Data.Entities.Libraries
{
/// <summary>
/// An entity holding metadata for a track.
/// </summary>
public class TrackMetadata : Metadata
2020-05-02 21:56:05 +00:00
{
/// <summary>
/// Initializes a new instance of the <see cref="TrackMetadata"/> class.
2020-05-02 21:56:05 +00:00
/// </summary>
2020-06-19 10:21:49 +00: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="track">The track.</param>
public TrackMetadata(string title, string language, Track track) : base(title, language)
2020-05-02 21:56:05 +00:00
{
if (track == null)
2020-06-20 08:35:29 +00:00
{
throw new ArgumentNullException(nameof(track));
2020-06-20 08:35:29 +00:00
}
track.TrackMetadata.Add(this);
2020-05-02 21:56:05 +00:00
}
2020-05-02 21:56:05 +00:00
/// <summary>
/// Initializes a new instance of the <see cref="TrackMetadata"/> class.
2020-05-02 21:56:05 +00:00
/// </summary>
/// <remarks>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </remarks>
protected TrackMetadata()
2020-05-02 21:56:05 +00:00
{
}
}
}