mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
Adds playback preferences and auto-persisted playback state to user settings
This commit is contained in:
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
|
||||
);
|
||||
+12
-1
@@ -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
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.UsersManagement.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the playback state of a user, as last reported by the player. The player writes these values automatically, and they 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.</param>
|
||||
/// <param name="IsMuted">The last mute state the player reported.</param>
|
||||
[DebuggerDisplay("Volume: {Volume}; IsMuted: {IsMuted}")]
|
||||
public sealed record PlaybackStateResponse(
|
||||
double Volume,
|
||||
bool IsMuted
|
||||
);
|
||||
@@ -1,4 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Playback;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
@@ -17,6 +18,11 @@ namespace Lumina.Contracts.Responses.UsersManagement.Settings;
|
||||
/// <param name="ShouldAggregateArtworkWhenMissing">Whether the artwork of the media library items is aggregated from multiple providers, when it is missing, or not.</param>
|
||||
/// <param name="ShouldRenderPdfAsImages">Whether PDF books are rendered as page images for the user, or not.</param>
|
||||
/// <param name="ShouldPreserveBookStyles">Whether the styles of the book content are preserved when it is rendered for the user, or not.</param>
|
||||
/// <param name="ShouldKeepDownloadingWhilePaused">Whether the player keeps downloading a track while playback is paused, or not.</param>
|
||||
/// <param name="ShouldAutoplay">Whether the player continues playback at the end of an album or artist, or not.</param>
|
||||
/// <param name="IsGaplessPlaybackEnabled">Whether the player transitions between consecutive tracks without a gap, or not.</param>
|
||||
/// <param name="ReplayGainMode">The way ReplayGain normalization is applied to the tracks the user plays.</param>
|
||||
/// <param name="StreamingQuality">The quality cap applied to the audio the server normalizes for the user.</param>
|
||||
[DebuggerDisplay("UserId: {UserId}")]
|
||||
public sealed record UserSettingsResponse(
|
||||
Guid UserId,
|
||||
@@ -27,5 +33,10 @@ public sealed record UserSettingsResponse(
|
||||
bool ShouldAggregateMetadataWhenMissing,
|
||||
bool ShouldAggregateArtworkWhenMissing,
|
||||
bool ShouldRenderPdfAsImages,
|
||||
bool ShouldPreserveBookStyles
|
||||
bool ShouldPreserveBookStyles,
|
||||
bool ShouldKeepDownloadingWhilePaused,
|
||||
bool ShouldAutoplay,
|
||||
bool IsGaplessPlaybackEnabled,
|
||||
ReplayGainMode ReplayGainMode,
|
||||
PlaybackStreamingQuality StreamingQuality
|
||||
);
|
||||
Reference in new issue
Block a user