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