Adds metadata aggregation to the media library enrichment job

This commit is contained in:
BinaryAlley committed 2026-08-24 14:18:40 -07:00
1 parent c82fadc7a2
commit 66871ccf62
168 files changed
+3503 -1062

No files matched your search

@@ -9,11 +9,13 @@ namespace Lumina.Application.Core.UsersManagement.Settings.Commands.UpdateUserSe
/// </summary>
/// <param name="IsPaginationEnabled">Whether pagination is enabled for the user, or not.</param>
/// <param name="ItemsPerPage">The number of library items displayed per page when pagination is enabled.</param>
/// <param name="IgnoreThePrefixForAlphaPicker">Whether the "The" prefix of library item titles is ignored by the alpha picker, or not.</param>
/// <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>
public record UpdateUserSettingsCommand(
bool IsPaginationEnabled,
int ItemsPerPage,
bool IgnoreThePrefixForAlphaPicker,
bool IsThemeCachingEnabled
bool ShouldIgnoreThePrefixForAlphaPicker,
bool IsThemeCachingEnabled,
bool ShouldAggregateMetadataWhenMissing
) : ICommand;
@@ -1,13 +1,12 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Common.Primitives;
using Lumina.Application.Common.CQRS;
using Lumina.Application.Common.DataAccess.Entities.UsersManagement;
using Lumina.Application.Common.DataAccess.Repositories.Users;
using Lumina.Application.Common.DataAccess.UoW;
using Lumina.Application.Common.Errors;
using Lumina.Application.Common.Infrastructure.Authentication;
using Lumina.Application.Common.Infrastructure.Validation;
using Lumina.Application.Common.Mapping.UsersManagement.Users;
using Lumina.Domain.Common.Primitives;
using Lumina.Domain.Core.BoundedContexts.UserManagementBoundedContext.UserAggregate.ValueObjects;
using Lumina.Domain.Core.BoundedContexts.UserManagementBoundedContext.UserSettingsAggregate;
using System;
@@ -72,8 +71,9 @@ public class UpdateUserSettingsCommandHandler : ICommandHandler<UpdateUserSettin
UserId.Create(userId),
command.IsPaginationEnabled,
command.ItemsPerPage,
command.IgnoreThePrefixForAlphaPicker,
command.IsThemeCachingEnabled);
command.ShouldIgnoreThePrefixForAlphaPicker,
command.IsThemeCachingEnabled,
command.ShouldAggregateMetadataWhenMissing);
if (createSettingsResult.IsFailure)
return createSettingsResult.Errors;
@@ -91,8 +91,9 @@ public class UpdateUserSettingsCommandHandler : ICommandHandler<UpdateUserSettin
Result<Updated> updateSettingsResult = toDomainEntityResult.Value.UpdateSettings(
command.IsPaginationEnabled,
command.ItemsPerPage,
command.IgnoreThePrefixForAlphaPicker,
command.IsThemeCachingEnabled);
command.ShouldIgnoreThePrefixForAlphaPicker,
command.IsThemeCachingEnabled,
command.ShouldAggregateMetadataWhenMissing);
if (updateSettingsResult.IsFailure)
return updateSettingsResult.Errors;