Adds the should aggregate artwork when missing setting to the user settings, configuration, and validation

This commit is contained in:
BinaryAlley committed 2026-10-10 13:05:00 +03:00
1 parent 6b5e731546
commit e139a7bb00
21 files changed
+97 -43

No files matched your search

@@ -26,4 +26,9 @@ public class MediaSettingsDto
/// Gets or sets the directory where the media item files are stored.
/// </summary>
public required string BooksDirectory { get; init; }
/// <summary>
/// Gets or sets the directory where the music library item files are stored.
/// </summary>
public required string MusicDirectory { get; init; }
}
@@ -23,6 +23,7 @@ public static class UpdateUserSettingsRequestMapping
request.ShouldIgnoreThePrefixForAlphaPicker,
request.IsThemeCachingEnabled,
request.ShouldAggregateMetadataWhenMissing,
request.ShouldAggregateArtworkWhenMissing,
request.ShouldRenderPdfAsImages,
request.ShouldPreserveBookStyles
);
@@ -31,6 +31,7 @@ public static class UserSettingsEntityMapping
repositoryEntity.ShouldIgnoreThePrefixForAlphaPicker,
repositoryEntity.IsThemeCachingEnabled,
repositoryEntity.ShouldAggregateMetadataWhenMissing,
repositoryEntity.ShouldAggregateArtworkWhenMissing,
repositoryEntity.ShouldRenderPdfAsImages,
repositoryEntity.ShouldPreserveBookStyles
);
@@ -50,6 +51,7 @@ public static class UserSettingsEntityMapping
repositoryEntity.ShouldIgnoreThePrefixForAlphaPicker,
repositoryEntity.IsThemeCachingEnabled,
repositoryEntity.ShouldAggregateMetadataWhenMissing,
repositoryEntity.ShouldAggregateArtworkWhenMissing,
repositoryEntity.ShouldRenderPdfAsImages,
repositoryEntity.ShouldPreserveBookStyles
);
@@ -27,6 +27,7 @@ public static class UserSettingsMapping
ShouldIgnoreThePrefixForAlphaPicker = domainEntity.ShouldIgnoreThePrefixForAlphaPicker,
IsThemeCachingEnabled = domainEntity.IsThemeCachingEnabled,
ShouldAggregateMetadataWhenMissing = domainEntity.ShouldAggregateMetadataWhenMissing,
ShouldAggregateArtworkWhenMissing = domainEntity.ShouldAggregateArtworkWhenMissing,
ShouldRenderPdfAsImages = domainEntity.ShouldRenderPdfAsImages,
ShouldPreserveBookStyles = domainEntity.ShouldPreserveBookStyles
};
@@ -46,6 +47,7 @@ public static class UserSettingsMapping
domainEntity.ShouldIgnoreThePrefixForAlphaPicker,
domainEntity.IsThemeCachingEnabled,
domainEntity.ShouldAggregateMetadataWhenMissing,
domainEntity.ShouldAggregateArtworkWhenMissing,
domainEntity.ShouldRenderPdfAsImages,
domainEntity.ShouldPreserveBookStyles
);
@@ -12,6 +12,7 @@ namespace Lumina.Application.Core.UsersManagement.Settings.Commands.UpdateUserSe
/// <param name="ShouldIgnoreThePrefixForAlphaPicker">Whether the "The" prefix of library item titles is ignored by the alpha picker, or not.</param>
/// <param name="IsThemeCachingEnabled">Whether the theme data served to this user is cached, or not.</param>
/// <param name="ShouldAggregateMetadataWhenMissing">Whether the metadata of the media library items is aggregated from multiple providers, when fields are missing, or not.</param>
/// <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>
public record UpdateUserSettingsCommand(
@@ -20,6 +21,7 @@ public record UpdateUserSettingsCommand(
bool ShouldIgnoreThePrefixForAlphaPicker,
bool IsThemeCachingEnabled,
bool ShouldAggregateMetadataWhenMissing,
bool ShouldAggregateArtworkWhenMissing,
bool ShouldRenderPdfAsImages,
bool ShouldPreserveBookStyles
) : ICommand;
@@ -74,6 +74,7 @@ public class UpdateUserSettingsCommandHandler : ICommandHandler<UpdateUserSettin
command.ShouldIgnoreThePrefixForAlphaPicker,
command.IsThemeCachingEnabled,
command.ShouldAggregateMetadataWhenMissing,
command.ShouldAggregateArtworkWhenMissing,
command.ShouldRenderPdfAsImages,
command.ShouldPreserveBookStyles);
if (createSettingsResult.IsFailure)
@@ -96,6 +97,7 @@ public class UpdateUserSettingsCommandHandler : ICommandHandler<UpdateUserSettin
command.ShouldIgnoreThePrefixForAlphaPicker,
command.IsThemeCachingEnabled,
command.ShouldAggregateMetadataWhenMissing,
command.ShouldAggregateArtworkWhenMissing,
command.ShouldRenderPdfAsImages,
command.ShouldPreserveBookStyles);
if (updateSettingsResult.IsFailure)