Wires book reader consumption reporting and resume

This commit is contained in:
BinaryAlley committed 2026-10-26 08:47:45 +02:00
1 parent bfa7b190b2
commit 8011c532a1
28 files changed
+1037 -167

No files matched your search

@@ -10,9 +10,12 @@ namespace Lumina.Presentation.Web.Common.Requests.MediaConsumption;
/// <param name="Position">The final position reported for the media item, if the client knows it. Optional.</param>
/// <param name="ProgressFraction">The fraction of the media item that the client reached, between 0 and 1. Required.</param>
/// <param name="ConsumedDurationInSeconds">The active duration consumed by the session, in seconds. Required.</param>
[DebuggerDisplay("ProgressFraction: {ProgressFraction}; ConsumedDurationInSeconds: {ConsumedDurationInSeconds}")]
/// <param name="ConsecutivePagesRead">The number of consecutive pages read in the session, used by page based media such as books.
/// It must be omitted or zero for other kinds; a positive value is rejected with a forbidden error. When omitted, the count stored by the last progress report is kept. Optional.</param>
[DebuggerDisplay("ProgressFraction: {ProgressFraction}; ConsumedDurationInSeconds: {ConsumedDurationInSeconds}; ConsecutivePagesRead: {ConsecutivePagesRead}")]
public sealed record CompleteConsumptionRequest(
MediaPositionRequest? Position,
double? ProgressFraction,
double? ConsumedDurationInSeconds
double? ConsumedDurationInSeconds,
int? ConsecutivePagesRead = null
);
@@ -10,7 +10,8 @@ namespace Lumina.Presentation.Web.Common.Requests.MediaConsumption;
/// <param name="Position">The last position reported for the media item, if the client knows it. Optional.</param>
/// <param name="ProgressFraction">The fraction of the media item that the client reached, between 0 and 1. Required.</param>
/// <param name="ConsumedDurationInSeconds">The active duration consumed by the session, in seconds. Required.</param>
/// <param name="ConsecutivePagesRead">The number of consecutive pages read in the current session, used by page based media such as books and ignored for other kinds. Defaults to 0. Optional.</param>
/// <param name="ConsecutivePagesRead">The number of consecutive pages read in the current session, used by page based media such as books.
/// It must be zero for other kinds; a positive value is rejected with a forbidden error. Defaults to 0. Optional.</param>
[DebuggerDisplay("ProgressFraction: {ProgressFraction}; ConsumedDurationInSeconds: {ConsumedDurationInSeconds}; ConsecutivePagesRead: {ConsecutivePagesRead}")]
public sealed record ReportConsumptionProgressRequest(
MediaPositionRequest? Position,
@@ -10,9 +10,12 @@ namespace Lumina.Presentation.Web.Common.Requests.MediaConsumption;
/// <param name="Position">The final position reported for the media item, if the client knows it. Optional.</param>
/// <param name="ProgressFraction">The fraction of the media item that the client reached, between 0 and 1. Required.</param>
/// <param name="ConsumedDurationInSeconds">The active duration consumed by the session, in seconds. Required.</param>
[DebuggerDisplay("ProgressFraction: {ProgressFraction}; ConsumedDurationInSeconds: {ConsumedDurationInSeconds}")]
/// <param name="ConsecutivePagesRead">The number of consecutive pages read in the session, used by page based media such as books.
/// It must be omitted or zero for other kinds; a positive value is rejected with a forbidden error. When omitted, the count stored by the last progress report is kept. Optional.</param>
[DebuggerDisplay("ProgressFraction: {ProgressFraction}; ConsumedDurationInSeconds: {ConsumedDurationInSeconds}; ConsecutivePagesRead: {ConsecutivePagesRead}")]
public sealed record StopConsumptionRequest(
MediaPositionRequest? Position,
double? ProgressFraction,
double? ConsumedDurationInSeconds
double? ConsumedDurationInSeconds,
int? ConsecutivePagesRead = null
);