jellyfin/Jellyfin.Data/Entities/Libraries/PhotoMetadata.cs

37 lines
1.1 KiB
C#
Raw Normal View History

using System;
2020-08-29 19:30:09 +02:00
namespace Jellyfin.Data.Entities.Libraries
{
/// <summary>
/// An entity that holds metadata for a photo.
/// </summary>
public class PhotoMetadata : Metadata
2020-05-02 23:56:05 +02:00
{
/// <summary>
/// Initializes a new instance of the <see cref="PhotoMetadata"/> class.
2020-05-02 23:56:05 +02:00
/// </summary>
/// <param name="title">The title or name of the photo.</param>
2020-06-19 12:21:49 +02:00
/// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="photo">The photo.</param>
public PhotoMetadata(string title, string language, Photo photo) : base(title, language)
2020-05-02 23:56:05 +02:00
{
if (photo == null)
2020-06-20 10:35:29 +02:00
{
throw new ArgumentNullException(nameof(photo));
2020-06-20 10:35:29 +02:00
}
photo.PhotoMetadata.Add(this);
2020-05-02 23:56:05 +02:00
}
2020-05-02 23:56:05 +02:00
/// <summary>
/// Initializes a new instance of the <see cref="PhotoMetadata"/> class.
2020-05-02 23:56:05 +02:00
/// </summary>
/// <remarks>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </remarks>
protected PhotoMetadata()
2020-05-02 23:56:05 +02:00
{
}
}
}