Scopes books to a media library and tracks their metadata enrichment status

This commit is contained in:
BinaryAlley committed 2026-08-12 11:01:59 -07:00
1 parent 386d583a2b
commit f33817f2d2
48 files changed
+2038 -63

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for a genre.
/// </summary>
/// <param name="Name">Gets the name of the genre.</param>
/// <param name="Name">The name of the genre.</param>
[DebuggerDisplay("Name: {Name}")]
public record GenreDto(
string? Name
@@ -7,9 +7,9 @@ namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for language information.
/// </summary>
/// <param name="LanguageCode">Gets the ISO code of the language (e.g., "en" for English). Required.</param>
/// <param name="LanguageName">Gets the name of the language in English. Required.</param>
/// <param name="NativeName">Gets the native name of the language (e.g., "Español" for Spanish). Optional.</param>
/// <param name="LanguageCode">The ISO code of the language (e.g., "en" for English). Required.</param>
/// <param name="LanguageName">The name of the language in English. Required.</param>
/// <param name="NativeName">The native name of the language (e.g., "Español" for Spanish). Optional.</param>
[DebuggerDisplay("LanguageName: {LanguageName}")]
public record LanguageInfoDto(
string? LanguageCode,
+3 -3
View File
@@ -7,9 +7,9 @@ namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for a rating.
/// </summary>
/// <param name="Value">Gets the rating value.</param>
/// <param name="MaxValue">Gets the maximum possible rating value.</param>
/// <param name="VoteCount">Gets the number of votes that contributed to the rating.</param>
/// <param name="Value">The rating value.</param>
/// <param name="MaxValue">The maximum possible rating value.</param>
/// <param name="VoteCount">The number of votes that contributed to the rating.</param>
[DebuggerDisplay("{Value}/{MaxValue}")]
public abstract record RatingDto(
decimal? Value,
@@ -8,12 +8,12 @@ namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for a release information.
/// </summary>
/// <param name="OriginalReleaseDate">Gets the original release date of the content. Optional.</param>
/// <param name="OriginalReleaseYear">Gets the original release year of the content. Optional.</param>
/// <param name="ReReleaseDate">Gets the re-release date of the content. Optional.</param>
/// <param name="ReReleaseYear">Gets the re-release year of the content. Optional.</param>
/// <param name="ReleaseCountry">Gets the country where the content was released. Optional.</param>
/// <param name="ReleaseVersion">Gets the version or edition of the content's release. Optional.</param>
/// <param name="OriginalReleaseDate">The original release date of the content. Optional.</param>
/// <param name="OriginalReleaseYear">The original release year of the content. Optional.</param>
/// <param name="ReReleaseDate">The re-release date of the content. Optional.</param>
/// <param name="ReReleaseYear">The re-release year of the content. Optional.</param>
/// <param name="ReleaseCountry">The country where the content was released. Optional.</param>
/// <param name="ReleaseVersion">The version or edition of the content's release. Optional.</param>
[DebuggerDisplay("OriginalReleaseDate: {OriginalReleaseDate}")]
public record ReleaseInfoDto(
DateOnly? OriginalReleaseDate,
+1 -1
View File
@@ -7,7 +7,7 @@ namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for a tag.
/// </summary>
/// <param name="Name">Gets the name of the tag.</param>
/// <param name="Name">The name of the tag.</param>
[DebuggerDisplay("Name: {Name}")]
public record TagDto(
string? Name
@@ -2,7 +2,8 @@
using Lumina.Contracts.DTO.MediaContributors;
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary;
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
using Lumina.Domain.Common.Enums.BookLibrary;
using Lumina.Domain.SharedKernel.Common.Enums.BookLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
@@ -12,6 +13,8 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra
/// <summary>
/// Represents a request to add a book.
/// </summary>
/// <param name="LibraryId">The Id of the media library this book belongs to. Required.</param>
/// <param name="Path">The file system path of the book. Required.</param>
/// <param name="Metadata">Written content metadata of the book. Required.</param>
/// <param name="Format">The format of the book (e.g., Hardcover, Paperback). Optional.</param>
/// <param name="Edition">The edition of the book. Optional.</param>
@@ -31,6 +34,8 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra
/// <param name="Ratings">The list of ratings for this book. Required.</param>
[DebuggerDisplay("Title: {Metadata.Title}")]
public record AddBookRequest(
Guid LibraryId,
string Path,
WrittenContentMetadataDto? Metadata,
BookFormat? Format,
string? Edition,
@@ -0,0 +1,15 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibrary.Books;
/// <summary>
/// Represents a request to get the books of a media library.
/// </summary>
/// <param name="LibraryId">The Id of the media library whose books are retrieved. Required.</param>
[DebuggerDisplay("LibraryId: {LibraryId}")]
public record GetBooksRequest(
Guid LibraryId
);
@@ -2,7 +2,7 @@
using Lumina.Contracts.DTO.MediaContributors;
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary;
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
using Lumina.Domain.Common.Enums.BookLibrary;
using Lumina.Domain.SharedKernel.Common.Enums.BookLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -14,6 +14,8 @@ namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibr
/// Represents a book response.
/// </summary>
/// <param name="Id">The id of the book.</param>
/// <param name="LibraryId">The Id of the media library this book belongs to.</param>
/// <param name="Path">The file system path of the book.</param>
/// <param name="Metadata">Written content metadata of the book.</param>
/// <param name="Format">The format of the book (e.g., Hardcover, Paperback), if applicable.</param>
/// <param name="Edition">The edition of the book, if applicable.</param>
@@ -31,11 +33,16 @@ namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibr
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book.</param>
/// <param name="Contributors">The list of media contributors (actors, directors, etc) starring in this book.</param>
/// <param name="Ratings">The list of ratings for this book.</param>
/// <param name="MetadataStatus">The status of the metadata enrichment of the book.</param>
/// <param name="LastMetadataUpdateUtc">The date and time when the metadata of the book was last enriched, if applicable.</param>
/// <param name="MetadataProvider">The name of the plugin that enriched the metadata of the book, if applicable.</param>
/// <param name="CreatedOnUtc">The date and time when the book was created.</param>
/// <param name="UpdatedOnUtc">The optional date and time when the book was updated.</param>
[DebuggerDisplay("Title: {Metadata.Title}")]
public record BookResponse(
Guid Id,
Guid LibraryId,
string Path,
WrittenContentMetadataDto Metadata,
BookFormat? Format,
string? Edition,
@@ -53,6 +60,9 @@ public record BookResponse(
List<IsbnDto>? ISBNs,
List<MediaContributorDto>? Contributors,
List<BookRatingDto>? Ratings,
MetadataStatus MetadataStatus,
DateTime? LastMetadataUpdateUtc,
string? MetadataProvider,
DateTime CreatedOnUtc,
DateTime? UpdatedOnUtc
);