Merge branch 'feature/add-metadata-aggregation' into feature/add-artwork-provider-and-metadata-aggregation

This commit is contained in:
BinaryAlley committed 2026-08-24 22:53:57 -07:00
commit b47588cf83
168 files changed
+3503 -1062

No files matched your search

@@ -2,7 +2,6 @@
using Bogus;
using Lumina.Application.Core.MediaLibrary.Management.Commands.AddLibrary;
using Lumina.Domain.SharedKernel.Common.Enums.MediaLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
@@ -25,7 +24,7 @@ public class AddLibraryCommandFixture
/// <param name="coverImage">Optional. The cover image path of the media library.</param>
/// <param name="isEnabled">Whether the media library is enabled or not.</param>
/// <param name="isLocked">Whether the media library is locked or not.</param>
/// <param name="downloadMetadataFromWeb">Whether the media library should download metadata from the web or not.</param>
/// <param name="canDownloadMetadataFromWeb">Whether the media library should download metadata from the web or not.</param>
/// <param name="shouldSaveMetadataInMediaDirectories">Whether the metadata should be saved in the media directories or not.</param>
/// <param name="shouldSkipUnchangedDirectoriesDuringScan">Whether unchanged directories should be skipped during a scan or not.</param>
/// <returns>The created command.</returns>
@@ -36,7 +35,7 @@ public class AddLibraryCommandFixture
string? coverImage = null,
bool isEnabled = true,
bool isLocked = false,
bool downloadMetadataFromWeb = true,
bool canDownloadMetadataFromWeb = true,
bool shouldSaveMetadataInMediaDirectories = true,
bool shouldSkipUnchangedDirectoriesDuringScan = false)
{
@@ -58,7 +57,7 @@ public class AddLibraryCommandFixture
.RuleFor(x => x.CoverImage, f => coverImage ?? f.System.FilePath())
.RuleFor(x => x.IsEnabled, isEnabled)
.RuleFor(x => x.IsLocked, isLocked)
.RuleFor(x => x.DownloadMetadataFromWeb, downloadMetadataFromWeb)
.RuleFor(x => x.CanDownloadMetadataFromWeb, canDownloadMetadataFromWeb)
.RuleFor(x => x.ShouldSaveMetadataInMediaDirectories, shouldSaveMetadataInMediaDirectories)
.RuleFor(x => x.ShouldSkipUnchangedDirectoriesDuringScan, shouldSkipUnchangedDirectoriesDuringScan)
.Generate();
@@ -27,7 +27,7 @@ public class UpdateLibraryCommandFixture
/// <param name="coverImage">Optional. The cover image path of the media library.</param>
/// <param name="isEnabled">Whether the media library is enabled or not.</param>
/// <param name="isLocked">Whether the media library is locked or not.</param>
/// <param name="downloadMetadataFromWeb">Whether the media library should download metadata from the web or not.</param>
/// <param name="canDownloadMetadataFromWeb">Whether the media library should download metadata from the web or not.</param>
/// <param name="shouldSaveMetadataInMediaDirectories">Whether the metadata should be saved in the media directories or not.</param>
/// <param name="shouldSkipUnchangedDirectoriesDuringScan">Whether unchanged directories should be skipped during a scan or not.</param>
/// <returns>The created command.</returns>
@@ -40,7 +40,7 @@ public class UpdateLibraryCommandFixture
string? coverImage = null,
bool isEnabled = true,
bool isLocked = false,
bool downloadMetadataFromWeb = true,
bool canDownloadMetadataFromWeb = true,
bool shouldSaveMetadataInMediaDirectories = true,
bool shouldSkipUnchangedDirectoriesDuringScan = false)
{
@@ -66,7 +66,7 @@ public class UpdateLibraryCommandFixture
.RuleFor(x => x.CoverImage, f => coverImage ?? f.System.FilePath())
.RuleFor(x => x.IsEnabled, isEnabled)
.RuleFor(x => x.IsLocked, isLocked)
.RuleFor(x => x.DownloadMetadataFromWeb, downloadMetadataFromWeb)
.RuleFor(x => x.CanDownloadMetadataFromWeb, canDownloadMetadataFromWeb)
.RuleFor(x => x.ShouldSaveMetadataInMediaDirectories, shouldSaveMetadataInMediaDirectories)
.RuleFor(x => x.ShouldSkipUnchangedDirectoriesDuringScan, shouldSkipUnchangedDirectoriesDuringScan)
.Generate();
@@ -19,21 +19,23 @@ public class UpdateUserSettingsCommandFixture
/// </summary>
/// <param name="isPaginationEnabled">Optional. Whether pagination is enabled for the user, or not.</param>
/// <param name="itemsPerPage">Optional. The number of library items displayed per page when pagination is enabled.</param>
/// <param name="ignoreThePrefixForAlphaPicker">Optional. Whether the "The" prefix is ignored by the alpha picker, or not.</param>
/// <param name="shouldIgnoreThePrefixForAlphaPicker">Optional. Whether the "The" prefix is ignored by the alpha picker, or not.</param>
/// <param name="isThemeCachingEnabled">Optional. Whether the theme data served to this user is cached, or not.</param>
/// <returns>The created command.</returns>
public UpdateUserSettingsCommand Create(
bool? isPaginationEnabled = null,
int? itemsPerPage = null,
bool? ignoreThePrefixForAlphaPicker = null,
bool? isThemeCachingEnabled = null)
bool? shouldIgnoreThePrefixForAlphaPicker = null,
bool? isThemeCachingEnabled = null,
bool? shouldAggregateMetadataWhenMissing = null)
{
return new Faker<UpdateUserSettingsCommand>()
.CustomInstantiator(f => new UpdateUserSettingsCommand(default, default, default, default))
.CustomInstantiator(f => new UpdateUserSettingsCommand(default, default, default, default, default))
.RuleFor(x => x.IsPaginationEnabled, f => isPaginationEnabled ?? f.Random.Bool())
.RuleFor(x => x.ItemsPerPage, f => itemsPerPage ?? f.Random.Int(1, 100))
.RuleFor(x => x.IgnoreThePrefixForAlphaPicker, f => ignoreThePrefixForAlphaPicker ?? f.Random.Bool())
.RuleFor(x => x.ShouldIgnoreThePrefixForAlphaPicker, f => shouldIgnoreThePrefixForAlphaPicker ?? f.Random.Bool())
.RuleFor(x => x.IsThemeCachingEnabled, f => isThemeCachingEnabled ?? f.Random.Bool())
.RuleFor(x => x.ShouldAggregateMetadataWhenMissing, f => shouldAggregateMetadataWhenMissing ?? f.Random.Bool())
.Generate();
}