Adds playback preferences and auto-persisted playback state to user settings

This commit is contained in:
BinaryAlley committed 2026-10-15 21:09:38 +03:00
1 parent aab36dcd29
commit dd76309ded
81 files changed
+6102 -173

No files matched your search

@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.UsersManagement.Settings;
/// <summary>
/// Represents a request to report the playback state of the current user. The player sends this automatically, and these values are not part of the settings the user edits.
/// </summary>
/// <param name="Volume">The last volume the player reported, as a value between 0 and 1. Required.</param>
/// <param name="IsMuted">The last mute state the player reported. Required.</param>
[DebuggerDisplay("Volume: {Volume}; IsMuted: {IsMuted}")]
public sealed record UpdatePlaybackStateRequest(
double? Volume,
bool? IsMuted
);
@@ -1,4 +1,5 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.SharedKernel.Common.Enums.Playback;
using System.Diagnostics;
#endregion
@@ -15,6 +16,11 @@ namespace Lumina.Contracts.Requests.UsersManagement.Settings;
/// <param name="ShouldAggregateArtworkWhenMissing">Whether the artwork of the media library items is aggregated from multiple providers, when it is missing, or not. Required.</param>
/// <param name="ShouldRenderPdfAsImages">Whether PDF books are rendered as page images for the user, or not. Required.</param>
/// <param name="ShouldPreserveBookStyles">Whether the styles of the book content are preserved when it is rendered for the user, or not. Required.</param>
/// <param name="ShouldKeepDownloadingWhilePaused">Whether the player keeps downloading a track while playback is paused, or not. Required.</param>
/// <param name="ShouldAutoplay">Whether the player continues playback at the end of an album or artist, or not. Required.</param>
/// <param name="IsGaplessPlaybackEnabled">Whether the player transitions between consecutive tracks without a gap, or not. Required.</param>
/// <param name="ReplayGainMode">The way ReplayGain normalization is applied to the tracks the user plays. Required.</param>
/// <param name="StreamingQuality">The quality cap applied to the audio the server normalizes for the user. Required.</param>
[DebuggerDisplay("IsPaginationEnabled: {IsPaginationEnabled}; ItemsPerPage: {ItemsPerPage}")]
public sealed record UpdateUserSettingsRequest(
bool IsPaginationEnabled,
@@ -24,5 +30,10 @@ public sealed record UpdateUserSettingsRequest(
bool ShouldAggregateMetadataWhenMissing,
bool ShouldAggregateArtworkWhenMissing,
bool ShouldRenderPdfAsImages,
bool ShouldPreserveBookStyles
bool ShouldPreserveBookStyles,
bool? ShouldKeepDownloadingWhilePaused,
bool? ShouldAutoplay,
bool? IsGaplessPlaybackEnabled,
ReplayGainMode? ReplayGainMode,
PlaybackStreamingQuality? StreamingQuality
);