Adds alpha picker filtering to the books lite query

This commit is contained in:
BinaryAlley committed 2026-08-16 10:34:08 -07:00
1 parent e72625de7c
commit 6fa154a2e7
12 files changed
+376 -10

No files matched your search

@@ -13,4 +13,17 @@ public record LibraryFilterDto : BaseFilterDto
/// The Id of the media library used to filter data.
/// </summary>
public required Guid LibraryId { get; init; }
/// <summary>
/// The alpha key used to filter the data by the first character of the item title, for the alpha picker.
/// Can be <see langword="null"/> to disable alpha filtering, a single ASCII letter (case-insensitive) to filter by that letter,
/// <see cref="LibraryItemAlphaKeys.NUMBER"/> to filter by titles whose first character is a digit,
/// or <see cref="LibraryItemAlphaKeys.SYMBOL"/> to filter by titles whose first character is neither a letter nor a digit.
/// </summary>
public string? FilterAlphaKey { get; init; }
/// <summary>
/// Whether the leading "The " prefix of a title should be ignored when computing the alpha key, or not.
/// </summary>
public bool IgnoreThePrefixForAlphaPicker { get; init; }
}
@@ -0,0 +1,20 @@
#region ========================================================================= USING =====================================================================================
#endregion
namespace Lumina.Application.Common.DTO.Filtering;
/// <summary>
/// Collection of the special alpha keys that can be used for alpha filtering, in addition to the single letters.
/// </summary>
public static class LibraryItemAlphaKeys
{
/// <summary>
/// The alpha key that filters the items by titles whose first character is a digit.
/// </summary>
public const string NUMBER = "#";
/// <summary>
/// The alpha key that filters the items by titles whose first character is neither a letter nor a digit.
/// </summary>
public const string SYMBOL = "*";
}