Adds book reading support with EPUB and PDF reader plugins

This commit is contained in:
BinaryAlley committed 2026-09-02 04:45:11 -07:00
1 parent 275fd83ff2
commit f7ccdf3d1c
271 files changed
+11501 -361

No files matched your search

@@ -0,0 +1,21 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading;
/// <summary>
/// Represents the reading availability of a book.
/// </summary>
/// <param name="BookId">The Id of the book whose reading availability is reported.</param>
/// <param name="LibraryId">The Id of the media library the book belongs to.</param>
/// <param name="IsAvailable">Whether the book can be opened for reading.</param>
/// <param name="ErrorCode">The code of the error preventing the book from being read, when it cannot be read. Can be <see langword="null"/> when the book is available.</param>
[DebuggerDisplay("BookId: {BookId}, IsAvailable: {IsAvailable}")]
public sealed record ReadingAvailabilityResponse(
Guid BookId,
Guid LibraryId,
bool IsAvailable,
string? ErrorCode
);
@@ -0,0 +1,27 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading;
/// <summary>
/// Represents the reading manifest of a book, containing everything the client needs to render the reader.
/// </summary>
/// <param name="Title">The title of the book.</param>
/// <param name="Author">The author of the book, if known.</param>
/// <param name="CoverResourceKey">The resource key of the cover image of the book, if applicable.</param>
/// <param name="TableOfContents">The hierarchical table of contents of the book.</param>
/// <param name="Spine">The ordered spine of the reading sections of the book.</param>
/// <param name="ResourceKeys">The resource keys of the resources of the book.</param>
/// <param name="HasTextContent">Whether the book has extractable text content. A scanned book, whose pages are only images, has no text content.</param>
[DebuggerDisplay("Title: {Title}")]
public sealed record ReadingManifestResponse(
string Title,
string? Author,
string? CoverResourceKey,
IReadOnlyList<ReadingTocEntryResponse> TableOfContents,
IReadOnlyList<ReadingSpineItemResponse> Spine,
IReadOnlyList<string> ResourceKeys,
bool HasTextContent
);
@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading;
/// <summary>
/// Represents an item of the spine of the reading manifest of a book.
/// </summary>
/// <param name="LocationRef">The opaque location reference of the reading section.</param>
/// <param name="Title">The title of the reading section, if known.</param>
[DebuggerDisplay("LocationRef: {LocationRef}")]
public sealed record ReadingSpineItemResponse(
string LocationRef,
string? Title
);
@@ -0,0 +1,19 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books.Reading;
/// <summary>
/// Represents an entry of the table of contents of the reading manifest of a book.
/// </summary>
/// <param name="Label">The label of the table of contents entry.</param>
/// <param name="LocationRef">The opaque location reference of the reading section the entry points to.</param>
/// <param name="Children">The child entries of the table of contents entry.</param>
[DebuggerDisplay("Label: {Label}")]
public sealed record ReadingTocEntryResponse(
string Label,
string LocationRef,
IReadOnlyList<ReadingTocEntryResponse> Children
);