Rename Metadata to ItemMetadata

This commit is contained in:
Patrick Barron 2020-09-01 11:38:09 -04:00
parent 1f2e7e47ce
commit a5f75a2d1a
15 changed files with 35 additions and 35 deletions

View File

@ -10,7 +10,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity containing metadata for a book. /// An entity containing metadata for a book.
/// </summary> /// </summary>
public class BookMetadata : Metadata, IHasCompanies public class BookMetadata : ItemMetadata, IHasCompanies
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BookMetadata"/> class. /// Initializes a new instance of the <see cref="BookMetadata"/> class.

View File

@ -6,7 +6,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity holding metadata for a <see cref="Company"/>. /// An entity holding metadata for a <see cref="Company"/>.
/// </summary> /// </summary>
public class CompanyMetadata : Metadata public class CompanyMetadata : ItemMetadata
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CompanyMetadata"/> class. /// Initializes a new instance of the <see cref="CompanyMetadata"/> class.

View File

@ -5,7 +5,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity containing metadata for a custom item. /// An entity containing metadata for a custom item.
/// </summary> /// </summary>
public class CustomItemMetadata : Metadata public class CustomItemMetadata : ItemMetadata
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CustomItemMetadata"/> class. /// Initializes a new instance of the <see cref="CustomItemMetadata"/> class.

View File

@ -6,7 +6,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity containing metadata for an <see cref="Episode"/>. /// An entity containing metadata for an <see cref="Episode"/>.
/// </summary> /// </summary>
public class EpisodeMetadata : Metadata public class EpisodeMetadata : ItemMetadata
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="EpisodeMetadata"/> class. /// Initializes a new instance of the <see cref="EpisodeMetadata"/> class.

View File

@ -14,8 +14,8 @@ namespace Jellyfin.Data.Entities.Libraries
/// Initializes a new instance of the <see cref="Genre"/> class. /// Initializes a new instance of the <see cref="Genre"/> class.
/// </summary> /// </summary>
/// <param name="name">The name.</param> /// <param name="name">The name.</param>
/// <param name="metadata">The metadata.</param> /// <param name="itemMetadata">The metadata.</param>
public Genre(string name, Metadata metadata) public Genre(string name, ItemMetadata itemMetadata)
{ {
if (string.IsNullOrEmpty(name)) if (string.IsNullOrEmpty(name))
{ {
@ -24,12 +24,12 @@ namespace Jellyfin.Data.Entities.Libraries
Name = name; Name = name;
if (metadata == null) if (itemMetadata == null)
{ {
throw new ArgumentNullException(nameof(metadata)); throw new ArgumentNullException(nameof(itemMetadata));
} }
metadata.Genres.Add(this); itemMetadata.Genres.Add(this);
} }
/// <summary> /// <summary>

View File

@ -11,14 +11,14 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An abstract class that holds metadata. /// An abstract class that holds metadata.
/// </summary> /// </summary>
public abstract class Metadata : IHasArtwork, IHasConcurrencyToken public abstract class ItemMetadata : IHasArtwork, IHasConcurrencyToken
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Metadata"/> class. /// Initializes a new instance of the <see cref="ItemMetadata"/> class.
/// </summary> /// </summary>
/// <param name="title">The title or name of the object.</param> /// <param name="title">The title or name of the object.</param>
/// <param name="language">ISO-639-3 3-character language codes.</param> /// <param name="language">ISO-639-3 3-character language codes.</param>
protected Metadata(string title, string language) protected ItemMetadata(string title, string language)
{ {
if (string.IsNullOrEmpty(title)) if (string.IsNullOrEmpty(title))
{ {
@ -43,12 +43,12 @@ namespace Jellyfin.Data.Entities.Libraries
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Metadata"/> class. /// Initializes a new instance of the <see cref="ItemMetadata"/> class.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Default constructor. Protected due to being abstract. /// Default constructor. Protected due to being abstract.
/// </remarks> /// </remarks>
protected Metadata() protected ItemMetadata()
{ {
} }

View File

@ -14,8 +14,8 @@ namespace Jellyfin.Data.Entities.Libraries
/// Initializes a new instance of the <see cref="MetadataProviderId"/> class. /// Initializes a new instance of the <see cref="MetadataProviderId"/> class.
/// </summary> /// </summary>
/// <param name="providerId">The provider id.</param> /// <param name="providerId">The provider id.</param>
/// <param name="metadata">The metadata entity.</param> /// <param name="itemMetadata">The metadata entity.</param>
public MetadataProviderId(string providerId, Metadata metadata) public MetadataProviderId(string providerId, ItemMetadata itemMetadata)
{ {
if (string.IsNullOrEmpty(providerId)) if (string.IsNullOrEmpty(providerId))
{ {
@ -24,12 +24,12 @@ namespace Jellyfin.Data.Entities.Libraries
ProviderId = providerId; ProviderId = providerId;
if (metadata == null) if (itemMetadata == null)
{ {
throw new ArgumentNullException(nameof(metadata)); throw new ArgumentNullException(nameof(itemMetadata));
} }
metadata.Sources.Add(this); itemMetadata.Sources.Add(this);
} }
/// <summary> /// <summary>

View File

@ -10,7 +10,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity holding the metadata for a movie. /// An entity holding the metadata for a movie.
/// </summary> /// </summary>
public class MovieMetadata : Metadata, IHasCompanies public class MovieMetadata : ItemMetadata, IHasCompanies
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MovieMetadata"/> class. /// Initializes a new instance of the <see cref="MovieMetadata"/> class.

View File

@ -8,7 +8,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity holding the metadata for a music album. /// An entity holding the metadata for a music album.
/// </summary> /// </summary>
public class MusicAlbumMetadata : Metadata public class MusicAlbumMetadata : ItemMetadata
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MusicAlbumMetadata"/> class. /// Initializes a new instance of the <see cref="MusicAlbumMetadata"/> class.

View File

@ -18,17 +18,17 @@ namespace Jellyfin.Data.Entities.Libraries
/// Initializes a new instance of the <see cref="PersonRole"/> class. /// Initializes a new instance of the <see cref="PersonRole"/> class.
/// </summary> /// </summary>
/// <param name="type">The role type.</param> /// <param name="type">The role type.</param>
/// <param name="metadata">The metadata.</param> /// <param name="itemMetadata">The metadata.</param>
public PersonRole(PersonRoleType type, Metadata metadata) public PersonRole(PersonRoleType type, ItemMetadata itemMetadata)
{ {
Type = type; Type = type;
if (metadata == null) if (itemMetadata == null)
{ {
throw new ArgumentNullException(nameof(metadata)); throw new ArgumentNullException(nameof(itemMetadata));
} }
metadata.PersonRoles.Add(this); itemMetadata.PersonRoles.Add(this);
Sources = new HashSet<MetadataProviderId>(); Sources = new HashSet<MetadataProviderId>();
} }

View File

@ -5,7 +5,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity that holds metadata for a photo. /// An entity that holds metadata for a photo.
/// </summary> /// </summary>
public class PhotoMetadata : Metadata public class PhotoMetadata : ItemMetadata
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="PhotoMetadata"/> class. /// Initializes a new instance of the <see cref="PhotoMetadata"/> class.

View File

@ -14,17 +14,17 @@ namespace Jellyfin.Data.Entities.Libraries
/// Initializes a new instance of the <see cref="Rating"/> class. /// Initializes a new instance of the <see cref="Rating"/> class.
/// </summary> /// </summary>
/// <param name="value">The value.</param> /// <param name="value">The value.</param>
/// <param name="metadata">The metadata.</param> /// <param name="itemMetadata">The metadata.</param>
public Rating(double value, Metadata metadata) public Rating(double value, ItemMetadata itemMetadata)
{ {
Value = value; Value = value;
if (metadata == null) if (itemMetadata == null)
{ {
throw new ArgumentNullException(nameof(metadata)); throw new ArgumentNullException(nameof(itemMetadata));
} }
metadata.Ratings.Add(this); itemMetadata.Ratings.Add(this);
} }
/// <summary> /// <summary>

View File

@ -6,7 +6,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity that holds metadata for seasons. /// An entity that holds metadata for seasons.
/// </summary> /// </summary>
public class SeasonMetadata : Metadata public class SeasonMetadata : ItemMetadata
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SeasonMetadata"/> class. /// Initializes a new instance of the <see cref="SeasonMetadata"/> class.

View File

@ -11,7 +11,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity representing series metadata. /// An entity representing series metadata.
/// </summary> /// </summary>
public class SeriesMetadata : Metadata, IHasCompanies public class SeriesMetadata : ItemMetadata, IHasCompanies
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SeriesMetadata"/> class. /// Initializes a new instance of the <see cref="SeriesMetadata"/> class.

View File

@ -5,7 +5,7 @@ namespace Jellyfin.Data.Entities.Libraries
/// <summary> /// <summary>
/// An entity holding metadata for a track. /// An entity holding metadata for a track.
/// </summary> /// </summary>
public class TrackMetadata : Metadata public class TrackMetadata : ItemMetadata
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="TrackMetadata"/> class. /// Initializes a new instance of the <see cref="TrackMetadata"/> class.