CustomItemMetadata.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. namespace Jellyfin.Data.Entities.Libraries
  3. {
  4. /// <summary>
  5. /// An entity containing metadata for a custom item.
  6. /// </summary>
  7. public class CustomItemMetadata : ItemMetadata
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="CustomItemMetadata"/> 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="item">The item.</param>
  15. public CustomItemMetadata(string title, string language, CustomItem item) : base(title, language)
  16. {
  17. if (item == null)
  18. {
  19. throw new ArgumentNullException(nameof(item));
  20. }
  21. item.CustomItemMetadata.Add(this);
  22. }
  23. /// <summary>
  24. /// Initializes a new instance of the <see cref="CustomItemMetadata"/> class.
  25. /// </summary>
  26. /// <remarks>
  27. /// Default constructor. Protected due to required properties, but present because EF needs it.
  28. /// </remarks>
  29. protected CustomItemMetadata()
  30. {
  31. }
  32. }
  33. }