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,25 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Application.Core.UsersManagement.Settings.Commands.UpdatePlaybackState;
using Lumina.Contracts.Requests.UsersManagement.Settings;
#endregion
namespace Lumina.Application.Common.Mapping.UsersManagement.Users;
/// <summary>
/// Extension methods for converting <see cref="UpdatePlaybackStateRequest"/>.
/// </summary>
public static class UpdatePlaybackStateRequestMapping
{
/// <summary>
/// Converts <paramref name="request"/> to <see cref="UpdatePlaybackStateCommand"/>.
/// </summary>
/// <param name="request">The request to be converted.</param>
/// <returns>The converted command.</returns>
public static UpdatePlaybackStateCommand ToCommand(this UpdatePlaybackStateRequest request)
{
return new UpdatePlaybackStateCommand(
request.Volume,
request.IsMuted
);
}
}
@@ -25,7 +25,12 @@ public static class UpdateUserSettingsRequestMapping
request.ShouldAggregateMetadataWhenMissing,
request.ShouldAggregateArtworkWhenMissing,
request.ShouldRenderPdfAsImages,
request.ShouldPreserveBookStyles
request.ShouldPreserveBookStyles,
request.ShouldKeepDownloadingWhilePaused,
request.ShouldAutoplay,
request.IsGaplessPlaybackEnabled,
request.ReplayGainMode,
request.StreamingQuality
);
}
}
@@ -33,7 +33,14 @@ public static class UserSettingsEntityMapping
repositoryEntity.ShouldAggregateMetadataWhenMissing,
repositoryEntity.ShouldAggregateArtworkWhenMissing,
repositoryEntity.ShouldRenderPdfAsImages,
repositoryEntity.ShouldPreserveBookStyles
repositoryEntity.ShouldPreserveBookStyles,
repositoryEntity.ShouldKeepDownloadingWhilePaused,
repositoryEntity.ShouldAutoplay,
repositoryEntity.IsGaplessPlaybackEnabled,
repositoryEntity.ReplayGainMode,
repositoryEntity.StreamingQuality,
repositoryEntity.Volume,
repositoryEntity.IsMuted
);
}
@@ -53,7 +60,12 @@ public static class UserSettingsEntityMapping
repositoryEntity.ShouldAggregateMetadataWhenMissing,
repositoryEntity.ShouldAggregateArtworkWhenMissing,
repositoryEntity.ShouldRenderPdfAsImages,
repositoryEntity.ShouldPreserveBookStyles
repositoryEntity.ShouldPreserveBookStyles,
repositoryEntity.ShouldKeepDownloadingWhilePaused,
repositoryEntity.ShouldAutoplay,
repositoryEntity.IsGaplessPlaybackEnabled,
repositoryEntity.ReplayGainMode,
repositoryEntity.StreamingQuality
);
}
}
@@ -29,7 +29,14 @@ public static class UserSettingsMapping
ShouldAggregateMetadataWhenMissing = domainEntity.ShouldAggregateMetadataWhenMissing,
ShouldAggregateArtworkWhenMissing = domainEntity.ShouldAggregateArtworkWhenMissing,
ShouldRenderPdfAsImages = domainEntity.ShouldRenderPdfAsImages,
ShouldPreserveBookStyles = domainEntity.ShouldPreserveBookStyles
ShouldPreserveBookStyles = domainEntity.ShouldPreserveBookStyles,
ShouldKeepDownloadingWhilePaused = domainEntity.ShouldKeepDownloadingWhilePaused,
ShouldAutoplay = domainEntity.ShouldAutoplay,
IsGaplessPlaybackEnabled = domainEntity.IsGaplessPlaybackEnabled,
ReplayGainMode = domainEntity.ReplayGainMode,
StreamingQuality = domainEntity.StreamingQuality,
Volume = domainEntity.Volume,
IsMuted = domainEntity.IsMuted
};
}
@@ -49,7 +56,12 @@ public static class UserSettingsMapping
domainEntity.ShouldAggregateMetadataWhenMissing,
domainEntity.ShouldAggregateArtworkWhenMissing,
domainEntity.ShouldRenderPdfAsImages,
domainEntity.ShouldPreserveBookStyles
domainEntity.ShouldPreserveBookStyles,
domainEntity.ShouldKeepDownloadingWhilePaused,
domainEntity.ShouldAutoplay,
domainEntity.IsGaplessPlaybackEnabled,
domainEntity.ReplayGainMode,
domainEntity.StreamingQuality
);
}
}