TrackMetadata.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. namespace Jellyfin.Data.Entities.Libraries
  3. {
  4. /// <summary>
  5. /// An entity holding metadata for a track.
  6. /// </summary>
  7. public class TrackMetadata : ItemMetadata
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="TrackMetadata"/> class.
  11. /// </summary>
  12. /// <param name="title">The title or name of the object.</param>
  13. /// <param name="language">ISO-639-3 3-character language codes.</param>
  14. /// <param name="track">The track.</param>
  15. public TrackMetadata(string title, string language, Track track) : base(title, language)
  16. {
  17. if (track == null)
  18. {
  19. throw new ArgumentNullException(nameof(track));
  20. }
  21. track.TrackMetadata.Add(this);
  22. }
  23. /// <summary>
  24. /// Initializes a new instance of the <see cref="TrackMetadata"/> class.
  25. /// </summary>
  26. /// <remarks>
  27. /// Default constructor. Protected due to required properties, but present because EF needs it.
  28. /// </remarks>
  29. protected TrackMetadata()
  30. {
  31. }
  32. }
  33. }